En réponse à [EMAIL PROTECTED]:

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:[EMAIL PROTECTED]/

_______________________________________________
Phpxmldb-phpxml-arc mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/phpxmldb-phpxml-arc

Reply via email to