A 2D array of a XML file of a specific schema as noted in the original post.
RegExp is perfectly capable of parsing that.
Uzytkownik "Andy Hassall" <andy@andyh.co.uk> napisal w wiadomosci
news:50ro50pbv3to897q1m5h5jqvpm9fb01ehj@4ax.com...[color=blue]
> On Sat, 20 Mar 2004 10:35:12 -0500, "Chung Leong"[/color]
<chernyshevsky@hotmail.com>[color=blue]
> wrote:
>[color=green]
> >Uzytkownik "lawrence" <lkrubner@geocities.com> napisal w wiadomosci
> >news:da7e68e8.0403191540.4694a67e@posting.google. com...[color=darkred]
> >> I can't quite figure out PHP's XML functions. Given an XML stream like
> >> the one below, how do I get a 2D array?[/color]
> >
> >Parse the file with preg_match_all. That'll give you a 2D array.[/color]
>
> But a 2D array of what? You cannot parse XML with a single regular[/color]
expression,[color=blue]
> they aren't capable of storing enough state information to act as an
> SGML/HTML/XML parser.
>
> To parse XML, use an XML parser.
>
> --
> Andy Hassall <andy@andyh.co.uk> / Space: disk usage analysis tool
>
http://www.andyh.co.uk /
http://www.andyhsoftware.co.uk/space[/color]