How to use xml file in asp.net?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rajanji
    New Member
    • May 2008
    • 31

    #1

    How to use xml file in asp.net?

    Dear All,

    I am using an httpapi and i get an xml output in return from that. I am newbie to this and dont know how to process the returned xml. Kindly advice how to use this online xml file into my application to display to the user . The format of xml file is as follows :-

    - <hashtable>
    - <entry>
    <string>abc.net </string>
    - <hashtable>
    - <entry>
    <string>statu s</string>
    <string>regthro ughothers</string>
    </entry>
    - <entry>
    <string>classke y</string>
    <string>dotne t</string>
    </entry>
    </hashtable>
    </entry>
    - <entry>
    <string>abc.org </string>
    - <hashtable>
    - <entry>
    <string>statu s</string>
    <string>regthro ughothers</string>
    </entry>
    - <entry>
    <string>classke y</string>
    <string>domor g</string>
    </entry>
    </hashtable>
    </entry>
    - <entry>
    <string>abc.inf o</string>
    - <hashtable>
    - <entry>
    <string>statu s</string>
    <string>regthro ughothers</string>
    </entry>
    - <entry>
    <string>classke y</string>
    <string>dominfo </string>
    </entry>
    </hashtable>
    </entry>
    - <entry>
    <string>abc.com </string>
    - <hashtable>
    - <entry>
    <string>statu s</string>
    <string>regthro ughothers</string>
    </entry>
    - <entry>
    <string>classke y</string>
    <string>domcn o</string>
    </entry>
    </hashtable>
    </entry>
    </hashtable>

    It is checking the where domain abc.net, abc.or,abc.com, abc.info are availabe or not..

    Now, How to load this in DataSet. Because while loading in dataset its giving error like :-

    A column named 'string' already belongs to this DataTable: cannot set a nested table name to the same name.

    Please Help



    Thanks a ton in advance.



    Regards,
    Rajan Arora
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Check out this MSDN article on Loading a DataSet from XML.

    :)

    -Frinny

    Comment

    Working...