Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Sorting an XML fragment

From: MyCross <mross@---------------.--->
To: NULL
Date: 4/9/2008 9:03:00 AM
Hello,  I'm facing a problem modifying some existing code, and I could
really use some help.

I have a database that has XML fragments stored in a column of a
table.  These fragments look like this:

 <Trend>
  <Score PullDate="2008-03-22T00:00:00" Value="768" />
  <Score PullDate="2007-11-28T00:00:00" Value="748" />
 </Trend>


I have a C# (.Net 2.0) program that walks through the table and uses
these fragments (among other things) to build a large XML document by
using XmlTextWriter.  All that works fine, but now my client wants the
<Score> elements of each <Trend> element to be sorted by their
PullDate.  I have access to the XML fragment as shown above in a text
string before it gets written to the XML document via the
XmlTextWriter.

I have no idea how to approach this.  It's just an in-memory string
with an XML fragment, not an XML document - can I use XSLT on that?

Can anybody give me a nudge in the right direction?

Thanks in advance.





transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent