Prev Question
Next Question

Consider the following XML file:

<?xml version=”1.0″ encoding=”ISO-8859-1″ ?>
<!DOCTYPE html
PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<title> SimpleXML Example</title>
</head>
<body>
<h1>
Please go <a href=”http://www.PassGuide.com”>http://www.PassGuide.com</a>
<br/>
</h1>
</body>
</html>
Which of the following statements will display the HREF attribute on the anchor tag if the
SimpleXML object is $sxml?

A.
$sxml->body->h1->a->href

B.
$sxml->body->h1->a<href>

C.
$sxml->body->h1->a[‘href’]

D.
$sxml->h1->a->href

Explanation:

Prev Question
Next Question

Leave a Reply

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