[phpXML] Re: basic phpxml help
Brought to you by:
bs_php,
nigelswinson
From: <lu...@sa...> - 2001-10-08 16:13:26
|
Hello, $contents = $xml->evaluate('/root'); foreach ($contents as content) { $myitem = $xml->get_content($content."/item[1]"); .... } At 06:49 15/07/01 +0000, you wrote: >Hello all, > >I'm new to using the phpxml script and I can't seem to >get a basic example using the get_content() function to work. > >I was wondering if someone might be willing to point me in the right >direction here. I feel as though I'd be on my way if I could only >understand why such a simple example won't work. > >I've included the two files below (test.php and test.xml) >Any help would be very much appreciated. > >Thanks in advance for your time, > >John Vollmer > > >******test.php********** ><?php //include the phpxml class include("xml.php"); // bring in the xml >$xml = new XML("test.xml"); //get content of the item element $content = >$xml->get_content("/root/item"); //print the node's content echo "Content: >".$content; ?> > >*********test.xml*********** ><?xml version="1.0"?> ><root> > <item>content</item> ></root> > > >-- >This message has been sent through the <phpXML/> user discussion list. To >unsubscribe, please visit >https://sslsites.de/mailinglisten/user/us...@li.../ -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |