How can the value of <foo> tag accessed?

The XML document below has been parsed into $xml via SimpleXML. How can the value of <foo> tag accessed?
<?xml version=’1.0′?>
<document>
<bar>
<foo>Value</foo>
</bar>
</document>
A. $xml->bar[‘foo’]
B. $xml->bar->foo
C. $xml[‘document’][‘bar’][‘foo’]
D. $xml->document->bar->foo
E: $xml->getElementByName(‘foo’);

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.