[phpXML] "evalute" method problem
Brought to you by:
bs_php,
nigelswinson
From: Nigel S. on b. of <ma...@po...> - 2001-10-10 22:09:27
|
Hello all. let's make some example: test.xml: <article> <header> header of article </header> <body> <para> paragraph ... </para> <emp> emphasized text </emp> <para> whatever </para> </body> </article> and php code: <?php include './xml/xml.php'; $xmlfile = new XML ('test.xml'); $body = $xmlfile -> evaluate('/article/body/*'); foreach ($body as $body_elem) { print $body_elem.'<br/>'; } ?> Result is: /article[1]/body[1]/para[1] /article[1]/body[1]/para[2] /article[1]/body[1]/emp[1] I would like to see result like this: /article[1]/body[1]/para[1] /article[1]/body[1]/emp[1] /article[1]/body[1]/para[2] . Can you suggest a solution that might solve this problem. I need to obtain paths to nodes in the same order as in xml. waiting for help. :) Maciej Kus -------------------- [POLBOX - REKLAMA] ------------------------ Sprawd swoje bezpieczeñstwo w Sieci Zabezpiecz siê ! www.symantec.com/region/pl/product/nis2001.html ---------------------------------------------------------------- -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |