This is a sample of the XML file :
<Nodes version="1">
<Node name="root">
<Node name="message 3">
<Prp name="date" type="D" value="41019.2289042593"/>
<Prp name="priority" type="I" value="300"/>
<Prp name="child index" type="I" value="-1"/>
</Node>
<Node name="message 2">
<Prp name="date" type="D" value="41019.2288970833"/>
<Prp name="priority" type="I" value="300"/>
<Prp name="child index" type="I" value="-1"/>
</Node>
<Node name="message 1">
<Prp name="date" type="D" value="41019.2288965625"/>
<Prp name="priority" type="I" value="300"/>
<Prp name="child index" type="I" value="-1"/>
</Node>
</Node>
</Nodes>
I have to sort the “messagex” nodes according to the date (i.e the “value” attribute in Prp name=”date” type=”D” value=”41019.2288970833″/> field)
Im not able to find the solution as the tags have the same name and so do the attributes. Can you please guide me doing this?
1 Answer