[phpXML] basic phpxml help
Brought to you by:
bs_php,
nigelswinson
From: <jvo...@wi...> - 2001-10-08 15:20:21
|
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********** <html> <head> <title>xpath testing</title> </head> <body> <?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; ?> </body> </html> *********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.../ |