Solved

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

Posted on 2004-08-27
1
569 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 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