Re: parsing xml the right way
| From: | Aidan Lister | Date: | Fri, 02 Apr 2004 08:10:54 +0000 |
| Subject: | Re: parsing xml the right way | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182103@lists.php.net to get a copy of this message | ||
Wait until you have installed PHP5, then use the simplexml library.
You have not showed us any code, how are we to tell you if you are doing it
the right or wrong way?
"Merlin" <news.groups@web.de> wrote in message
news:20040402074541.70057.qmail@pb1.pair.com...
> Hi there,
>
> I think I am parsing xml documents the wrong way.
> There must be a better way to access the results laterone like objects.
>
> For example I would like to search in a free form for a city name
> inside an xml document and php should return the country name
> and continent.
>
> This is the xml structure:
> <Country size="4">
> <countryName>Andorra</countryName>
> <countryCode>AD</countryCode>
> <countryContinent>Europe</countryContinent>
> <Cities size="4">
> <city>Encamp</city>
> <city>Escaldes-Engordany</city>
> <city>Ordino</city>
> <city>Soldeu</city>
> </Cities>
> </Country>
>
> Has anybody a good hint for me?
>
> Thanx in advance,
>
> Merlin