We can create an object by using XML formatted string to an object by using simplexml_load_string function in PHP. Here we will take our sample XML formatted string.


require "xml-sample1.php";

The Output is here.

SimpleXMLElement Object ( [name] => Abcd [address] => SimpleXMLElement Object ( [door_no] => 234-ac [street] => Great Wall [city] => Alabama ) )

Your Rating

Post Comment This is for short comments only. Use the forum for more discussions.

HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 All rights reserved worldwide Privacy Policy Disclaimer