[phpXML] Re: [phpXML] Before 1N6
Brought to you by:
bs_php,
nigelswinson
From: <lu...@sa...> - 2001-10-08 13:48:58
|
At 11:39 26/09/01 +0000, lu...@sa... wrote: >Nigel, > >Before releasing 1N6 it would be a Good Thing (tm) to release a 1N5-style >version of original examples (government for example) to avoid the zillions >of question I have about : "how does this new way of Xpath.class.php-ing >work ???" > >Luc Or if you don't have enough time, just tell me what is now the right version of this code that worked with xml.php/1N4 : <buddy_list> <buddy id="1"> <lastname>Doe</lastname> <firstname>John</firstname> <isniceguy>Yes</isniceguy> </buddy> </buddy_list> $myatrributesarray = array(); $listofmybuddies = $xml->evaluate('/buddy_list/buddy'); foreach ( $listofmybuddies as $buddy ) { $myatrributesarray = $xml->get_attributes($buddy); $id = $myatrributesarray['id'] $firstname = $xml->get_attributes($buddy ."/firstname[1]"); $lastname = $xml->get_content($buddy ."/lastname[1]"); $isniceguy = $xml->get_content($buddy ."/isniceguy[1]"); } -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |