Zend
ZF-100-500 · Question #176
You run the following PHP script: <?php include("xml.inc"); if (!$dom = domxml_open_mem($xmlstr)) { echo "Error while parsing the XML document \n"; exit; } $a = ********* print_r($a); ?> Which of…
The correct answer is B. $dom->document_element(). See the full explanation below for the reasoning.
Question
You run the following PHP script: <?php include("xml.inc"); if (!$dom = domxml_open_mem($xmlstr)) { echo "Error while parsing the XML document \n"; exit; } $a = ********** print_r($a); ?> Which of the following functions will you use instead o f * if you want to print the root element of the XML file?
Options
- A$node->parent_node();
- B$dom->document_element();
- C$dom->root_node();
- D$dom->root_element();
How the community answered
(51 responses)- A2% (1)
- B84% (43)
- C10% (5)
- D4% (2)
Community Discussion
No community discussion yet for this question.