nerdexam
Zend

200-530 · Question #411

Consider the following XML file: <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <title> SimpleXML Example</title> </head> <body> <h1>…

The correct answer is C. $sxml->body->h1->a['href']. See the full explanation below for the reasoning.

Question

Consider the following XML file: <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" <title> SimpleXML Example</title> </head> <body> <h1> <br/> </h1> </body> </html> Which of the following statements will display the HREF attribute on the anchor tag if the SimpleXML object is $sxml? Zend 200-530 Exam

Exhibit

200-530 question #411 exhibit

Options

  • A$sxml->h1->a->href
  • B$sxml->body->h1->a->href
  • C$sxml->body->h1->a['href']
  • D$sxml->body->h1->a<href>

How the community answered

(52 responses)
  • A
    4% (2)
  • B
    13% (7)
  • C
    77% (40)
  • D
    6% (3)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice