CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: xml read

  1. #1
    Join Date
    Jan 2007
    Posts
    40

    Post xml read

    I have a xml file and in a node i have attribute name and on the bases of the name i have to select the text of the child node i am not geting the way so plz help me. the xml file is as

    <?xml version="1.0"?>
    <!--List of controls with their property settings-->
    <SheetGroup >
    <ControlSheet Name="Caption" Quantity="2">
    <NewControl Name="NewControl0">
    <Caption>country</Caption>
    <Type>TextBox</Type>
    <Value>Null</Value>
    </NewControl>
    <NewControl Name="NewControl1">
    <Caption>hobby</Caption>
    <Type>CheckBox</Type>
    <Value>Null</Value>
    </NewControl>
    </ControlSheet>
    </SheetGroup>



    on the bases of name attribute in newcontrol i have to select the value against that.



    thank you in advace!

  2. #2
    Join Date
    Mar 2006
    Location
    Craiova, Romania
    Posts
    439

    Re: xml read

    Bogdan

    If someone helped you then please Rate his post and mark the thread as Resolved
    Please improve your messages appearance by using tags [ code] Place your code here [ /code]

  3. #3
    Join Date
    Jan 2007
    Posts
    40

    Re: xml read

    suppose i have to calculate the value of the newcontrol1 then on the bases of the newcontrol1 how can we calculate the caption of that.

  4. #4
    Join Date
    Sep 1999
    Location
    Madurai , TamilNadu , INDIA
    Posts
    1,024

    Re: xml read

    I am not sure whether I understood your question. If you have trouble reading xml file, there are many ways to do it.

    1. using XmlTextReader class
    2. using XmlDocument and XPath query
    3. XmlSerializer class
    ..to name a few.

    I am not sure what value you are trying to calculate. Please state it clearly.

  5. #5
    Join Date
    Jan 2007
    Posts
    40

    Re: xml read

    in the above xml i hav to change the caption through the programatically
    how can i do it.
    <Caption> Name </Caption>

    i want to change the name value to the agethen ahow can i do it?

    after that the xml is like

    <Caption>age</Caption>


    thanxs in advance.

  6. #6
    Join Date
    Mar 2006
    Location
    Craiova, Romania
    Posts
    439

    Re: xml read

    Bogdan

    If someone helped you then please Rate his post and mark the thread as Resolved
    Please improve your messages appearance by using tags [ code] Place your code here [ /code]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured