[phpXML] Re: substringData doesn't work
Brought to you by:
bs_php,
nigelswinson
From: <lu...@sa...> - 2001-10-05 10:45:37
|
En réponse à pie...@wa...: Hello Pierre-Henri I'm learning XML/Xptah so I'm interested by your code. Why did you choose NOT to use this kind of code : Here is the XML file: --------------------- <NewsML> <Catalog Href="http://www.afp.com/dtd/AFPCatalog.xml"/> <NewsEnvelope> <DateAndTime>20010608T133354Z</DateAndTime> </NewsEnvelope> </NewsML> Here is the code: ----------------- $xml = new XPath($filepath); $t = array(); $listofNews = $xml->evaluate("NewsML"); foreach ($listofNews as $news) { $t = $xml->getAttributes ("NewsML/Catalog"); echo $t['Href']; echo $xml->getData("NewsML[1]/NewsEnvelope[1]/DateAndTime[1]"); } Luc -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |