veena v

veena v

  • NA
  • 3
  • 0

How to read XML node names?

Jul 16 2010 3:49 AM
Hi,

Using LINQ to XML how to read XML node names??

I have the Following XML
 
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <OrderDocument>
  3.   <rows>
  4.     <OrderDocumentRow>
  5.         <number>1</number>
  6.         <Cost>
  7.           <code>11</code>
  8.           <type>0</type>
  9.           <isDefault>false</isDefault>
  10.           <decimalTotal>0</decimalTotal>
  11.         </Cost>
  12.         <Order>
  13.           <code>88</code>
  14.           <type>0</type>
  15.           <isDefault>false</isDefault>
  16.           <decimalTotal>0</decimalTotal>
  17.         </Order>
  18.         <article>abc</article>
  19.       </OrderDocumentRow>
  20.   </rows>
  21. </OrderDocument>
 
I want to get all the node names inside <OrderDocumentRow>.
i.e.
1)number
2)Cost
3)Order
4)article etc..
How to get the node name list?

thank you,
Veena

Answers (3)