PrepAway - Latest Free Exam Questions & Answers

How can the value of <foo> tag accessed? <?xml version=’1.0′?

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>

PrepAway - Latest Free Exam Questions & Answers

A.
$xml->document->bar->foo

B.
$xml->getElementByName(‘foo’);

C.
$xml[‘document’][‘bar’][‘foo’]

D.
$xml->bar->foo

E.
$xml->bar[‘foo’]


Leave a Reply

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