Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
August 17, 2005, 11:41 pm
rate this thread
After loading an xml file, is it possible to sort it by attribute?
For example, I have the following xml file:
<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>
When I go to load this using PHP, I would use some this similar to
$xmldoc = domxml_open_file('diary.xml', DOMXML_LOAD_DONT_KEEP_BLANKS);
$node = $xmldoc->document_element();
Before I go storming through the xml tree outputing along the way, can
I sort it by (in this case) date?
- Tim Van Wassenhove
August 18, 2005, 1:28 am