RE: [PHP] Extract code from XML

From: Date: Fri, 30 Jan 2009 10:49:57 +0000
Subject: RE: [PHP] Extract code from XML
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-287406@lists.php.net to get a copy of this message
Angelo Zanetti wrote: > Thanks Per but I didn't send all the XML but you see that there is a > city code and an item code: > > <Hotel HasExtraInfo="true" HasMap="true" > HasPictures="true"> > <Recommended = "true"> > <City Code="AMS"><![CDATA[ Amsterdam ]]></City> > <Item Code="AME"><![CDATA[ AMERICAN ]]></Item> > > How would I get the Item code then? Based on your answer above? > Hi Angelo this should work: query( 'HotelDetails/Hotel/Item/@Code' ... /Per Jessen, Zürich

« previous php.general (#287406) next »