sort xml file with php

BuggBunny

New Member
I've browsed through all forum entries throughout the last 4 hours but I couldn't find a solution.I would like to sort the image nodes of an xml-file by the content of "desc" either ascending or descending and store it back into the xml file.\[code\]<?xml version="1.0" encoding="UTF-8"?><content> <image> <desc>AAH009: Edelweissanhaenger altsilberfarben</desc> <small_image_path max="yes">load/Anhaenger_Charms/thumbs/AAH009+Edelweissanhaenger_altsilberfarben_300DPI_thumb.jpg</small_image_path <big_image_path>load/Anhaenger_Charms/highres/AAH009+Edelweissanhaenger_altsilberfarben_300DPI.jpg</big_image_path> </image> <image> <desc>AAH011: Anhaenger Strassbreze altsilberfarben</desc> <small_image_path max="yes">load/Anhaenger_Charms/thumbs/AAH011+Anhaenger_Strassbreze_altsilberfarben_300DPI_thumb.jpg</small_image_path> <big_image_path>load/Anhaenger_Charms/highres/AAH011+Anhaenger_Strassbreze_altsilberfarben_300DPI.jpg</big_image_path> </image> <image> <desc>AAH012: Haferlschuh altsilberfarben</desc> <small_image_path max="yes">load/Anhaenger_Charms/thumbs/AAH012+Haferlschuh_altsilberfarben_300DPI_thumb.jpg</small_image_path> <big_image_path>load/Anhaenger_Charms/highres/AAH012+Haferlschuh_altsilberfarben_300DPI.jpg</big_image_path> </image></content>\[/code\]THanks for your help!!!!
 
Back
Top