Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Sorting an XML fragment Sorting an XML fragmentTo: 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. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
