[phpXML] Re: xml.php locat ion
Brought to you by:
bs_php,
nigelswinson
From: <lu...@sa...> - 2001-10-08 13:16:38
|
Oliver, <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]"); } En réponse à o.t...@ab...: > thanks, > > but I know how to use XPath functions. I only don't know how to get > the > functions of xmlphp to work. For example the get_content functions > returns > nothing. The evaluate function works. -- This message has been sent through the <phpXML/> user discussion list. To unsubscribe, please visit https://sslsites.de/mailinglisten/user/us...@li.../ |