Save details to xml file?


I have a form that allows a user to enter details about their location that I want to save to an xml file so they dont have to renter the details each time. This way I can set it to save multiple location details in future.

The problem I have is I dont know how to write the details to an xml file.

The form has textboxes for:

Telephone Number

I'm wanting to set a button to write these to an xml file so it would look like..

<location>New york</location>

Can anyone show me how I can go about this?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This sample project may help:

m0tSiEAuthor Commented:
I tried downlaoding the source files but it wasn't compatible with

good morning!
try sumthing like this...

sub WriteXml()

            Dim xmlSetting As New Xml.XmlWriterSettings
            xmlSetting.Indent = True

            Dim writer As Xml.XmlWriter = Xml.XmlWriter.Create("Sample.xml", xmlSetting)
            With writer
                .WriteElementString("Location", location.text)
                .WriteElementString("Name", name.text)
                .WriteElementString("Phone", phonenumber.text)
            End With
        Catch ex As Exception
        End Try

end sub

i hope i can give u idea...


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
m0tSiEAuthor Commented:
Cheers! :D

thank you for accepting my answer....

i just got my guru level.... :-)

Praise Be Unto God!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.