I have been given an XML document in a rather strange format and I need to load it into a DataSet, but unsurprisingly I get an error when I try to do so. I can see how I could transform the document into something that would work, but I'm kinda going around in circles with the XSLT stuff...
The document looks something like this:
<map>
<entry key = "status">ok</entry>
<entry key = "pageNum">1</entry>
<entry key = "title">DocTitle</entry>
<entry key = "stuff">
<map>
<entry key = "id">171</entry>
<entry key = "name">StackOverflow</entry>
<entry key = "timeZone">America/New_York</entry>
</map>
<map>
<entry key = "id">172</entry>
<entry key = "name">StackOverflow2</entry>
<entry key = "timeZone">America/New_York</entry>
</map>
</entry>
</map>
and I would like to transform it into something more like this:
<map>
<status>ok</status>
<pageNum>1</pageNum>
<title>DocTitle</title>
<stuff>
<map>
<id>171</id>
<name>StackOverflow</name>
<timeZone>America/New_York</timeZone>
</map>
<map>
<id>172</id>
<name>StackOverflow2</name>
<timeZone>America/New_York</timeZone>
</map>
</stuff>
</map>
I have all the code in place to run it through an XSLT transform and process the output, but I can't get the transform itself to produce anything sensible. I really don't think it's as difficult as I'm making it, and I would be eternally grateful if some wise soul could throw together something that would work.
Or maybe just point me to an example or something that I could modify...
Thanks.