XmlTextReader

D

DotNet

Is there a way to order items read from an XML document by their attributes
using XmlTextReader, eg

<NEWSITEM NEWSDATE="2002-01-23">item 1</NEWSITEM>
<NEWSITEM NEWSDATE="2002-01-24">item 2</NEWSITEM>

and order this by date?
 
C

Chris Jackson

The way I would do this is to use an XSL Transform.

<xsl:for-each select="NEWSITEM">
<xsl:sort select="@NEWSDATE"/>
....
</xsl:for-each>

Of course, there might be other ways to tackle this, but this is one.
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top