[ad_1]
I have used web scraping with selenium to get some quiz, my results are in a JSON file, and I would like to use them on WordPress.
But it only accepts XML file like this example for 1 question:
<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>
I tried to indent it to make it the clearest possible, sorry if it’s not supposed to be exactly like that but I haven’t learned XML yet.
Here’s my JSON for this example:
[
{
"titre": "QUESTION 1",
"question": "What provides guidance to the Developers on why they are building the Increment?\n(choose the best answer).",
"correct": [
"The Sprint Goal"
],
"incorrect": [
"The Product Owner",
"The Scrum Master",
"The Sprint Backlog"
],
"explic": "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."
},
]
I have to do that for 80 questions.
[ad_2]