PrepAway - Latest Free Exam Questions & Answers

Which of the following statements will display the HREF attribute on the anchor tag if the SimpleXML object is

Consider the following XML file:
<code>
<?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>
</code>

Which of the following statements will display the HREF attribute on the anchor tag if the
SimpleXML object is $sxml?

PrepAway - Latest Free Exam Questions & Answers

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

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

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

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


Leave a Reply

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