Hi,
After loading an xml file, is it possible to sort it by attribute?
For example, I have the following xml file:
<xml...
<diary>
<entry date="2005-01-01">I went to the park</entry>
<entry date="2005-01-03">Sold the car today</entry>
<entry date="2005-01-02">Went for a stroll</entry>
</diary>
When I go to load this using PHP, I would use some this similar to
this:
$xmldoc = domxml_open_fil e('diary.xml', DOMXML_LOAD_DON T_KEEP_BLANKS);
$node = $xmldoc->document_eleme nt();
Before I go storming through the xml tree outputing along the way, can
I sort it by (in this case) date?
Cheers
Burnsy
After loading an xml file, is it possible to sort it by attribute?
For example, I have the following xml file:
<xml...
<diary>
<entry date="2005-01-01">I went to the park</entry>
<entry date="2005-01-03">Sold the car today</entry>
<entry date="2005-01-02">Went for a stroll</entry>
</diary>
When I go to load this using PHP, I would use some this similar to
this:
$xmldoc = domxml_open_fil e('diary.xml', DOMXML_LOAD_DON T_KEEP_BLANKS);
$node = $xmldoc->document_eleme nt();
Before I go storming through the xml tree outputing along the way, can
I sort it by (in this case) date?
Cheers
Burnsy
Comment