nerdexam
Zend

200-530 · Question #160

200-530 Question #160: Real Exam Question with Answer & Explanation

Sign in or unlock 200-530 to reveal the answer and full explanation for question #160. The question stem and answer options stay visible for context.

Question

You have been given the following PHP script: 1. <?php 2. $xmlstring = <<<XML 3. <?xml version="1.0" encoding="ISO-8859-1"?> 4. <email> 7. <heading>Technical issue in Linux OS</heading> 8. <body>There is a technical issue in my Linux system. Please Fix it. </body> 9. </email> 10. XML; 11. $xml = new SimpleXMLElement($xmlstring); 12. foreach($xml->children() as $child) 13. { 14. <Insert code here.> 15. } 16. ?> Which of the following code snippets will you insert at line number 14 to get the following output?

Options

  • Aecho $child->getDocNamespaces() . ": " . $child . "<br />";
  • Becho $child->getNamespaces() . ": " . $child . "<br />";
  • Cecho $child->getName() . ": " . $child . "<br />";
  • Decho $child->asXML() . ": " . $child . "<br />";

Unlock 200-530 to see the answer

You've previewed enough free 200-530 questions. Unlock 200-530 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 200-530 Practice