How sort XmlDocument?

  • Thread starter Thread starter Ronald S. Cook
  • Start date Start date
R

Ronald S. Cook

I have loaded an XML document into an XmlDocument object. How can I sort
this on one of the elements?



Thanks,

Ron
 
Hi Ron,

You could do this manually by traversing the XML tree and processing it
with a sort algorithm, but an easier approach would be to transform
your XmlDocument using a simple XSLT template.

Check out the <xsl:sort> element:
http://www.w3schools.com/xsl/el_sort.asp

HTH,
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top