Zend
200-530 · Question #475
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…
The correct answer is C. $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 of * if you want to print the root element of the XML file?
Options
- A$dom->root_node();
- B$dom->root_element();
- C$dom->document_element();
- D$node->parent_node();
How the community answered
(29 responses)- A14% (4)
- B7% (2)
- C76% (22)
- D3% (1)
Community Discussion
No community discussion yet for this question.