Appending an XML file
Posted on 2006-07-07
I am using Visual Basic .NET. Here is my sample XML file:
<?xml version="1.0" encoding="utf-8" ?>
<title>This is a test</title>
<title>Item title test</title>
<description>Here is a description of an item</description>
<name>here is a file name</name>
<title>Item 2 title</title>
<description>Here is a description of 2</description>
<name>here is 2's file name</name>
I am parse the file fine but now I want to append it so I can add a new 'item' to the file. I am fairly new to XML and Visual Basic .NET. So how would I add a new item with title="Hello World", description="This is a test" and name="VB"? And finally save the XML file. Code would help.
Thank you for your help.