Sr. PHP Programmer Question:

How will you parse an XML document using PHP?

Senior PHP Programmer Interview Question
Senior PHP Programmer Interview Question

Answer:

PHP 5's new SimpleXML module makes parsing an XML document, well, simple. It turns an XML document into an object that provides structured access to the XML. To create a SimpleXML object from an XML document stored in a string, pass the string to simplexml_load_string( ). It returns a SimpleXML object.


Previous QuestionNext Question
How to Retrieve a Cookie Value in PHP?How to create a mysql connection?