This seems to me to be more easily handled by XSLT. (Not the only option but a good one).
XSLT lets you select only the nodes you want and also sort them as well.

@ Edwin wrote:


"Chris" <[EMAIL PROTECTED]> wrote:

I'm trying to write PHP code that will not only parse the XML but also
allow me to sort the parsed information by the values parsed.

I'm not sure if I really understand but let me try...

...[snip code]...

Adding echo '<table border="1">'; before this and

$xml_parser = xml_parser_create();

...[snip code]...

after this


echo '</table>';

shows a good view that you have a table with two columns.

If you'd like to sort these, then I think you might be able to do something
like this:
1. Instead of printf()'ing your <td>'s or <tr>'s inside the class/function,
why don't you try "putting" it inside an array? (Maybe with array_push() or
something.) Then,
2. If you already have an array, perhaps you can use one of the functions
here for sorting:


- E


PHP General Mailing List (
To unsubscribe, visit:

Reply via email to