Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

How to add attribute to an XMLNode

$
0
0

 

Hi

 

I have XML document which has following structure 

 

  <Item>
          <Type>Tyre</Type>
          <Level>10</Level>
  </Item>

  <Item>
          <Type>Ring</Type>
          <Level>09</Level>
  </Item>

 

I need to change this to

 

  <Item>
          <Level Type="Tyre" >10</Level>
  </Item>

  <Item>
           <Level Type="Ring">09</Level>
  </Item>

 

Any ideas?

 

I am using XmlDocument to create an XML document from string.

 

Thanks,

Prasad

 


Viewing all articles
Browse latest Browse all 935

Trending Articles