1

I am making a program, with visual basic, that will show information about contacts. In the program you can make notes about the contact and I have a xml file as a template. My question how do I take the template and fill it with info and save it as an xml file?

template:

<Data>
<date_created></date_created>
<short_description></shot_description>
<full_note></full_note>
</Data>
1
  • Are you asking for a way to use an XML file as a template, that your program will fill in and then save as a new file, or are you asking how to create an XML file that has the above format/elements? Commented Aug 6, 2013 at 2:49

1 Answer 1

1

One option(Xml Literal):

Dim xml = <Data>
            <date_created></date_created>
            <short_description></shot_description>
            <full_note></full_note>
          </Data>

Dim xmlDoc As New XmlDocument
xmldoc.LoadXml(xml.ToString)
xmldoc.Save({path}) 

Another option: xml Serialization

Sign up to request clarification or add additional context in comments.

2 Comments

How do I it take the user input and add it to the xml file I am creating?
Create a node and append it to the document.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.