XML

Last post 05-08-2008 12:33 PM by srachuri. 2 replies.

Sort Posts:

  • XML

    05-08-2008, 10:42 AM
    • Loading...
    • srachuri
    • Joined on 04-10-2008, 4:20 PM
    • Texas
    • Posts 92

    HI firnds I have xml string with many tag names like (ID,NAME)..

    So my question is.. I need a code to find out perticular tagname like ( welcome) this is the Tag Name........ for welcome name i need to find out ID.. for that.. it may be any where in the XML string

    so how I need to find out..

     

    I wrote the code but its allways taking the first filed id..

    XmlDocument xmldoc1 = new XmlDocument();

    xmldoc1.LoadXml(wel);

    XmlNodeList Info;

    Info = xmldoc1.GetElementsByTagName("Id");

    int wel;

    wel= Convert.ToInt32(role.Item(0).InnerText);

    bec I am not chekcking (welcome) tag in the xml string..

    I need this code in ASP.NET please can any one help me out regarding this..

    thanks

     

  • Re: XML

    05-08-2008, 12:20 PM
    Answer
    • Loading...
    • mgoveas
    • Joined on 03-05-2008, 10:33 PM
    • Posts 24

    Can you post your xml? Is it like

    <RootNode> 

        <Id>

       <Name>

       <Id>

       <Name>

    </RootNode>

    What do you mean by "its always taking the first field id"?

    Maria Goveas
    ***************************************************************************
    Please mark the post as Answer if it answered your questions. Thanks!
  • Re: XML

    05-08-2008, 12:33 PM
    Answer
    • Loading...
    • srachuri
    • Joined on 04-10-2008, 4:20 PM
    • Texas
    • Posts 92

     

Page 1 of 1 (3 items)