Manipulate XML Data in C#
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Manipulate XML Data in C#

  1. #1
    Join Date
    Dec 2008
    Posts
    6

    Manipulate XML Data in C#

    I am newbie in XML.
    How to manipulate xml data in C#??

    my xml file as shown below:

    myfile.xml:


    <project name="Hello">
    <target name="XXX">
    <exec program="PPP" failonerror="false">
    <arg value="SSS" />
    </exec>
    </target>
    <target name="YYY">
    <exec program="QQQ" failonerror="false">
    <arg value="aaa" />
    <arg value="bbb" />
    <arg value="ccc" />
    </exec>
    </target>
    <target name="ZZZ">
    <exec program="RRR" failonerror="false">
    <arg value="SSS" />
    <arg value="TTT" />
    </exec>
    </target>
    </project>

    How to get expected output as shown below in C# with XmlDocument and XPath? Thanks!

    <project name="Hello">
    <target name="XXX">
    <exec program="PPP" failonerror="false">
    <arg value="SSS" />
    </exec>
    </target>
    <target name="YYY">
    <exec program="QQQ" failonerror="false">
    <arg value="ddd" />
    <arg value="eee" />
    <arg value="aaa" />
    <arg value="bbb" />
    <arg value="ccc" />
    <arg value="zzz" />
    >arg value="yyy" />
    </exec>
    </target>
    <target name="ZZZ">
    <exec program="RRR" failonerror="false">
    <arg value="SSS" />
    <arg value="TTT" />
    </exec>
    </target>
    </project>

  2. #2
    Join Date
    Jul 2006
    Posts
    297

    Re: Manipulate XML Data in C#


Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center