Create XML file in C#

B

Bill

How could I reproduce this file?


<players>
−
<player>
<number>4</number>
<name>Pete Orr</name>
</player>
−
<player>
<number>22</number>
<name>Marcus Giles</name>
</player>
−
<player>
<number>10</number>
<name>Chipper Jones</name>
</player>
−
<player>
<number>25</number>
<name>Andruw Jones</name>
</player>
−
<player>
<number>7</number>
<name>Jeff Francoeur</name>
</player>
−
<player>
<number>18</number>
<name>Ryan Langerhaus</name>
</player>
−
<player>
<number>19</number>
<name>Adam LaRoche</name>
</player>
</players>
 
S

Shiva (GGK Tech)

Hello,

Here is the code generate xml,

string xmlString = thisXDocument.DOM.selectSingleNode(“XPath of your root
nodeâ€).text;
if(xmlString.length == 0)
{
return;
}
IXMLDOMDocument srcDom = thisXDocument.CreateDOM();
srcDom.loadXML(xmlString);
 

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

Top