tmyonline Posted February 19, 2008 Share Posted February 19, 2008 Hi guys: I have an xml file (donor_list.xml) which I read in using php as follow: $xml = new SimpleXMLElement(file_get_contents('donor_list.xml')); and then I got its content out using the "foreach" construct. Suppose this xml file consists of 3 parts: part A, part B, and part C. Suppose I don't want to read in the whole xml document but rather just a particular part, say part B. Is there a function in PHP that specifies where to begin reading and where to stop reading the xml file ? Alternatively, if I use XPath, how should I approach this ? Example(s) will help. Thanks so much! Link to comment https://forums.phpfreaks.com/topic/91973-how-to-read-an-xml-file-using-php/ Share on other sites More sharing options...
Barand Posted February 19, 2008 Share Posted February 19, 2008 Have a look at PHP's XSLT functions Link to comment https://forums.phpfreaks.com/topic/91973-how-to-read-an-xml-file-using-php/#findComment-471124 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.