Honesty Rocks! truth rules.

Reading Xml Data Within PHP

HOME      >>       Programming

Mordent

So I was idly pondering my next PHP venture today - more on that if/when I get it done - when I realised I needed to be able to read some data in from files. Sure, I could use simple binary files (each line having the relevant data on it, etc. etc.), but I figured I'd might as well learn how to use this snazzy XML stuff I keep hearing about.

 

So, after looking at W3Schools for a bit I couldn't find an obvious way of reading XML files in PHP. There was plenty of information of how to do it in JavaScript, but as I want to read the files in on the server rather than with the client's browser that's not much help. After searching on php.net I realised there was way more XML related stuff than I was ready for, so quite simply I'd like to know if it's possible to read XML files in using PHP (and specifically: on Xisto), how I go about it and any other little snippets of information you have on XML and PHP.

 

Thanks in advance!

 

Mordent


toby

There's millions of classes for this. Personally, I'd make my own, but I think this is the biggest one. http://uk3.php.net/simplexml


Mordent

Ah, perfect. Got to love how it's called SimpleXML, although damned if I spotted that when trawling through search results. :mellow:Cheers!