Zend
200-530 · Question #421
You have given the following XML data in the tasks.XML file: <?xml version="1.0" encoding="ISO-8859-1"?> <tasklist> <note> <tasks>Validate data</tasks> <details>String Validation</details> </note>…
Sign in or unlock 200-530 to reveal the answer and full explanation for question #421. The question stem and answer options stay visible for context.
Question
You have given the following XML data in the tasks.XML file: <?xml version="1.0" encoding="ISO-8859-1"?> <tasklist> <note> <tasks>Validate data</tasks> <details>String Validation</details> </note> <note> <tasks>Secure data</tasks> <details>Encryption</details> </note> </tasklist> Now, you run the following PHP script: <?php $objDOM = new DOMDocument(); $objDOM->load("tasks.xml"); $note = $objDOM->getElementsByTagName("note"); foreach( $note as $value ) { $tasks = $value->getElementsByTagName("tasks"); $task = $tasks->item(0)->nodeValue; $details = $value->getElementsByTagName("details"); $detail = $details->item(0)->nodeValue; echo "$task :: $detail <br>"; } ?> What should be displayed when this script is executed?
Options
- AThe contents of the whole XML document
- BThe XML of every tasks and details nodes
- CThe XML of whole XML document
- DThe contents of every tasks and details
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.