[ad_1]
I am trying to replace root elements in a XML file that looks like that :
<root>
<row>
<titre>QUESTION 1</titre>
<question>Which of the following is NOT an advantage of using Scrum to deliver projects?
(choose the best answer)
Choose only ONE best answer.</question>
<correct>It ensures that all requirements are delivered at the end of the project.</correct>
<incorrect>It minimizes non-essential work and leads to higher efficiency levels.</incorrect>
<incorrect>It leads to greater levels of motivation among employees.</incorrect>
<incorrect>It makes projects adaptable and open to incorporating change.</incorrect>
<explic>Scrum is a framework for developing, delivering, and sustaining complex products. The complex domain represents the "unknown unknowns". Cause and effect can only be deduced in retrospect. We cannot determine what will cause a particular outcome but we can run some experiments to see if they move us in the right direction. This is the domain of emergent practice. Scrum is founded on empirical process control theory, or empiricism and employs an iterative, incremental approach to optimize predictability and control risk. Scrum makes clear the relative efficacy of your product management and work techniques so that you can continuously improve the product, the team, and the working environment.</explic>
</row>
<row>
<titre>QUESTION 2</titre>
<question>Which of the following is a valid service from the Scrum Master to the Product Owner?
(choose the best answer)
Choose only ONE best answer.</question>
<correct>Helping the Product Owner find techniques for managing the Product Backlog.</correct>
<incorrect>Act as a proxy when the Product Owner is not available to the team.</incorrect>
<incorrect>Helping the Product Owner order the Product Backlog items in order to maximize value.</incorrect>
<incorrect>Act as the middleman between the Product Owner and the Development Team, as requested or required</incorrect>
<explic>The Scrum Master serves the Product Owner in several ways, including: Helping find techniques for effective Product Goal definition and Product Backlog management; Helping the Scrum Team understand the need for clear and concise Product Backlog items; Helping establish empirical product planning for a complex environment; and, Facilitating stakeholder collaboration as requested or needed. These are mainly focused on coaching/training, rather than getting involved and helping someone do a specific action. The help the Scrum Master is providing is coaching the PO to be able to manage the Product Backlog himself/herself (one of the core responsibilities of a PO). "Helping the Product Owner order the Product Backlog items..." , although not forbidden, is a short term temporary solution. The Scrum Master is not an assistant nor admin. If the Scrum Master is ordering the Product Backlog for the PO then the Scrum Master needs to evaluate why the PO is not able to do this work and seek out and solve the root cause of this issue.</explic>
</row>
</row>
into this :
Here’s an example for 1 question.
<questions>
<question answerType="single">
<title><![CDATA[Question 1]]></title>
<points>1</points>
<questionText><![CDATA[<p>What provides guidance to the Developers on why they are building the Increment?<br />(choose the best answer)</p>]]></questionText>
<correctMsg><![CDATA[<p>The Sprint Goal is an objective set for the Sprint that can be met through the implementation of Product Backlog. It provides guidance to the Scrum Team on why it is building the Increment.</p>]]></correctMsg>
<incorrectMsg><![CDATA[<p>The Sprint Goal is an objective set for the Sprint that can be met through the implementation of Product Backlog. It provides guidance to the Scrum Team on why it is building the Increment.</p>]]></incorrectMsg>
<tipMsg enabled="false"><![CDATA[]]></tipMsg>
<category/>
<correctSameText>true</correctSameText>
<showPointsInBox>false</showPointsInBox>
<answerPointsActivated>false</answerPointsActivated>
<answerPointsDiffModusActivated>false</answerPointsDiffModusActivated>
<disableCorrect>false</disableCorrect>
<answers>
<answer points="1" correct="true">
<answerText html="false"><![CDATA[The Sprint Goal]]></answerText>
<stortText html="false"><![CDATA[]]></stortText>
</answer>
<answer points="0" correct="false">
<answerText html="false"><![CDATA[The Product Owner]]></answerText>
<stortText html="false"><![CDATA[]]></stortText>
</answer>
<answer points="0" correct="false">
<answerText html="false"><![CDATA[The Scrum Master]]>
</answerText>
<stortText html="false"><![CDATA[]]></stortText></answer>
<answer points="0" correct="false">
<answerText html="false"><![CDATA[The Sprint Backlog]]></answerText>
<stortText html="false"><![CDATA[]]></stortText>
</answer>
</answers>
</question>
</questions>
I’d also have to add some others elements that are not in the first XML code as you can see.
Is it possible to do that in python? I can’t find a solution, if anyone could help me please.
[ad_2]