I need to insert data in the block of red <title> DATA HERE </title>
and in this
<description>
<text> DATA HERE</text>
</description>
using Simple XML. Below is a sample of the XML tree-
Below is my PHP code from creating the XML tags and data from <question>
onward but I have no clue how to do the above.
$questionLoad = $xml->children()[0]->addChild('question');
$textQue = $questionLoad->addChild('text', $que);
$optionNode = $questionLoad->addChild('option');
$ans1 = $optionNode->addChild('text', $answer1);
$score = $optionNode->addChild('score', $score1);
$explain = $optionNode->addChild('explanation');
$expl1 = $explain->addChild('text', $explanation1);
$xml->asXML('test.xml');