chokk Posted February 18, 2011 Share Posted February 18, 2011 Hello everyone,Can someone explain to me how exactly PHP and XML interact?Let's say I have an XML document containing a list of names. How do I extract those names using PHP and save them to a variable/array? And how do I add, delete or edit the names?Thanks! Link to comment Share on other sites More sharing options...
jeffman Posted February 18, 2011 Share Posted February 18, 2011 Look up SimpleXML and/or DOMDocument Link to comment Share on other sites More sharing options...
thescientist Posted February 18, 2011 Share Posted February 18, 2011 http://www.w3schools.com/php/php_xml_parser_expat.asphttp://www.w3schools.com/php/php_xml_dom.asphttp://www.w3schools.com/php/php_xml_simplexml.asp Link to comment Share on other sites More sharing options...
chokk Posted February 18, 2011 Author Share Posted February 18, 2011 I have looked through the documentation on php.net. I understand that there are functions that I have to use, but I don't know how to set them up. I know that I have to instantiate an xml parser but it's got me all confused.I need a straight-forward, in-depth and detailed tutorial on how to do this :-/ Link to comment Share on other sites More sharing options...
chokk Posted February 18, 2011 Author Share Posted February 18, 2011 http://www.w3schools.com/php/php_xml_parser_expat.asphttp://www.w3schools.com/php/php_xml_dom.asphttp://www.w3schools.com/php/php_xml_simplexml.asp Okay, this looks more like something I could understand. Thanks! I don't know how I could've missed it :s Link to comment Share on other sites More sharing options...
Fmdpa Posted February 18, 2011 Share Posted February 18, 2011 I just wrote a tutorial here in which PHP and XML interact using DOMDocument. DOMDocument is easy to pick up if you are familiar with PHP and have the PHP DOM documentation accessible. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.