[phpXML] RE: [phpXML] Subscription successful
Brought to you by:
bs_php,
nigelswinson
From: <sh...@co...> - 2001-10-08 17:06:41
|
Hello.....please forgive my question if it is stupid, I am a newbie to XML. Can anyone assist. Feel free to email me directly at sh...@co... I am trying to parse the following XML file http://www.coolshopping.com/xml/derek.xml with the following script: <?php // Include the <phpXML/> class. include("xml.php"); // Create an XML object for the XML file. $xml = new XML("derek.xml"); // Check whether a search term was given. $Products = $xml->evaluate("//Product"); // Run through all members of the government. foreach ( $Products as $Product ) { // Retrieve information about the person. $Code = $xml->get_content($Product."/Code[1]"); $Description = $xml->get_content($Product."/Description[1]"); $Url = $xml->get_content($Product."/Url[1]"); $Caption = $xml->get_content($Product."/Caption[1]"); $Thumb = $xml->get_content($Product."/Thumb[1]"); $BasePrice = $xml->get_content($Product."/Pricing/BasePrice[1]"); // Display the information. echo "merchant name: to be obtained <br>\n"; echo "product sku: $Code <br>\n"; echo "product name: $Description <br>\n"; echo "product category : ?????<br>\n"; echo "product short desc: $Caption <br>\n"; echo "product price: $BasePrice <br>\n"; echo "product manuf: ???? <br>\n"; echo "product img url: $Thumb<br>\n"; echo "product click url: $Url <br><hr>\n"; } ?> I do not understand how to obtain the fields: BasePrice ProductRef Url You can see my results at http://www.coolshopping.com/xml/test.php3 Can you give me some instructions on how to obtain these sub-level fields? Thank you in advance!! Amy Strycula, Creative Director Coolshopping.com http://www.coolshopping.com http://www.coolshopping.tv (412) 366-7545 voice (412) 366-8528 fax -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |