all groups > dotnet xml > march 2004 >
You're in the

dotnet xml

group:

adding an element to XML


adding an element to XML RCIC
3/30/2004 6:21:07 AM
dotnet xml:
I am getting data from a database in XML format. It looks like this

<NewDataSet><Table1></Table1><Table2></Table2></NewDataSet

Each time I update the XML it does so like this

<NewDataSet><Table1></Table1><Table2></Table2><Table1></Table1><Table2></Table2></NewDataSet

I would like it to reform the XML data with a schema. I would like the data to look like this

<NewDataSet><Query><Table1></Table1><Table2></Table2></Query><Query><Table1></Table1><Table2></Table2></Query></NewDataSet

Re: adding an element to XML Dino Chiesa [Microsoft]
3/31/2004 4:24:12 PM
Can you say more about how you are getting this data from the database?
Can you also say more about how you update the XML?
What APIs. What database? How is the XML generated? Is it a string? Is
it an XmlDocument ?
etc
To answer your question, "Is it possible to reform the xML?" yes, it is.
One way to do it is via xslt. Check the archives for examples. This may
not be what you want though.

-Dino

--
Dino Chiesa
Microsoft Developer Division
d i n o c h @ o n l i n e . m i c r o s o f t . c o m

[quoted text, click to view]
<NewDataSet><Table1></Table1><Table2></Table2><Table1></Table1><Table2></Tab
le2></NewDataSet>
[quoted text, click to view]
<NewDataSet><Query><Table1></Table1><Table2></Table2></Query><Query><Table1>
</Table1><Table2></Table2></Query></NewDataSet>
[quoted text, click to view]

AddThis Social Bookmark Button