Solved

How to Read/Write to XML file in .Net Compact Framework Using VB.Net

Posted on 2004-08-27
1
530 Views
Last Modified: 2008-01-09
This is the structure of my file:
<?xml version="1.0" encoding="utf-8"?>
<Configuration>
  <ZipCode>11787</ZipCode>
  <RefreshRate>5000</RefreshRate>
</Configuration>

On my form I have two text boxes one for the zip code and the other for the refresh rate. What I would like to do is when the application loads the two text boxes are populated with the data from the xml file. I then have a Save button below the two text boxes. What I would like to do here is save the changes I made in the text boxes to the same xml file.

I am trying to create a Pocket PC application and this xml file is being used as a configuration file.

Thanks In Advance.
0
Comment
Question by:AccessYourBiz_Com
1 Comment
 
LVL 5

Accepted Solution

by:
thenrich earned 125 total points
ID: 11916845

 Dim xmlDoc As New Xml.XmlDataDocument
   xmlDoc.Load(Application.StartupPath & "\temp.xml")
   xmlDoc.GetElementsByTagName("ZipCode")(0).InnerXml = textbox.text
   xmlDoc.GetElementsByTagName("ZipCode")(0).InnerXml = RefreshRate
   xmlDoc.Save(Application.StartupPath & "\test.xml")
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now