So, I have this code:
foreach ($xml->PrintQuestion as $PrintQuestion) {
if (!$PrintQuestion->content->multichoice->feedback->hint->Passage) {
fwrite($fp, "<contentid filename=\"$value\">" . $PrintQuestion->attributes()->id . "</contentid>");
}
}
Basically, I am trying to save identifiers in an XML file if Passagenode exists , but it seems to save every identifier whether nodes exist in Passageor not.
source
share