[phpXML] Re: [phpXML] Re: [phpXML] substringData doesn't work
Brought to you by:
bs_php,
nigelswinson
From: <pie...@wa...> - 2001-10-08 13:10:13
|
Hello, I need some help with the substringData function, it doesn't return anything. Am I doing something wrong? 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); $newsidentifier_eval = $xml->evaluate("NewsML/NewsEnvelope/DateAndTime"); echo $newsidentifier_eval[0] . " -- line1\n"; echo $xml->nodeName($newsidentifier_eval[0]) . " -- line2\n"; echo $xml->substringData($newsidentifier_eval[0]) . " -- line3\n"; Result: ------- /NewsML[1]/NewsEnvelope[1]/DateAndTime[1] -- line1 DateAndTime -- line2 -- line3 Thanks in advance. -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |