473,651 Members | 2,793 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open XML file, find record and update record

Hi,

Can someone help me to update my XML file?
This is what I have.

XmlDoc.Load(Map Path("~/myFile.xml"));
XmlNodeList oXmlUser = oXmlDoc.GetElem entsByTagName(" user");

foreach (XmlNode user in oXmlUser) {
// if user found, update and save/update file
}

I can find the user. And think to update it like this:
user.ChildNodes .Item(1).InnerT ext = "new";

But I don't know how to save/update the file.
How can I do that?

Thanks!
Dec 4 '05 #1
2 2275


Arjen wrote:
Can someone help me to update my XML file? XmlDoc.Load(Map Path("~/myFile.xml")); But I don't know how to save/update the file.


XmlDoc.Save(Map Path("~/myFile.xml"));
But make sure the user that ASP.NET is being executed with has the
proper permissions to write to the directory and to overwrite the file.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Dec 4 '05 #2
"Martin Honnen" <ma*******@yaho o.de> schreef in bericht
news:%2******** **********@TK2M SFTNGP12.phx.gb l...


Arjen wrote:
Can someone help me to update my XML file?

XmlDoc.Load(Map Path("~/myFile.xml"));

But I don't know how to save/update the file.


XmlDoc.Save(Map Path("~/myFile.xml"));
But make sure the user that ASP.NET is being executed with has the proper
permissions to write to the directory and to overwrite the file.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Thanks!

Arjen
Dec 4 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3465
by: BT3 | last post by:
I am trying to replace a single record in a flat file. The file is relatively small and no need for database. I open the file, and save the ftell() value in a variable. I read a record using fgetcsv(), modify the index contents it if/as necessary. I then position the pointer back to the beginning of that record using fseek(value_from_ftell). I build a new string with the required delimiters. Finally I put the record with fputs() (also...
4
25013
by: Andras Gilicz | last post by:
Hi VB fans I'm working on a relatively large project in VB6 with about a dozen forms, including graphs, labels, text boxes, etc. The software itself is actually a flow simulator with more or less complex technical calculations, several input variables. I would like to equipp the starting panel with the usual New, Open, Save, Save As, Close etc. menus (like in Excel, or Word, etc.) What is the best way to accomplish Save, or Save As?...
2
14912
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data in the format that I need it in order to create the reports that we use. So far this has proven to be successful for the reports that I am doing and the data that I am pulling into it. I just have one challenge that may require a lot of work and I...
7
10056
by: Steve_Black | last post by:
Hello, I'm toying with the idea of loading a MenuStrip (VB.Net 2005) dynamically based on who is logged into my system. Every user has different security settings and I want to customize the main menu instead of showing all possible options and only enabling/disabling certain ones. I have a table that stores the menu item name, parent item (if applicable), display order, etc. so that I can dynamically load my
7
12175
by: Mathew Butler | last post by:
I'm investigating an issue I have when pulling data back from MS access I'm retrieving all rows from a column in a table of 5000 rows - accessing a column of type "memo" ( can be 65353 character long) . I'm pulling the data back using ODBC. Details are: Microsoft Access Driver 4.00.6306.00 Jet 4.0 release level that is currently installed (Msjet40.dll ) "Microsoft Jet Engine Library" 4.0.9025.0 After 291 rows are retreived I am...
3
1928
by: penguin732901 | last post by:
What do experienced programmers find the most efficient way to handle user settings. Currently I have 4 tables which allow various clients to customize my program to work for them, tblAcademicSettings (fields), tblBillingsettings (32 fields), tblGraphical (23 fields), tblOwner (33 fields). There is one record for each table. Admittedly, some of the fields never change once set up, but many are there to allow the user to make
11
2437
by: kaisersose1995 | last post by:
Hi, I've got an import procedure working, using a standard import specification to import a .csv file into a temporary table. The problem i'm having is that i have 4 different sets of borrower details on the same line e.g. B1-Title, B1-Initials, B1-Surname, B2-Title, B2-Initials, B2-Surname, etc. all linked to my main borrower table via an unique account number. My 1st append query matches which account numbers are new to the main...
2
3100
by: Miro | last post by:
I will ask the question first then fumble thru trying to explain myself so i dont waste too much of your time. Question / Statement - Every mdb table needs a PrimaryKey ( or maybe an index - i havnt tested the index yet ) so you can use an .UPDATE( dataTable ) on the data adapter. Otherwise you will get an exception error. Is this statement true? ---- Now me fumbling thru
0
1767
by: trixxnixon | last post by:
i have a form that is being designed to pend requests in a requests database. the pend form is opened from an update form used by an employee to enter updates. when the pend form is updated, the tracking number of the current request is imported to the pend form, and query results are displayed at the bottom(all previous pending records for the imported tracking number) the pend button saves either the start pending date or the end pending...
0
8352
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8802
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8697
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8579
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7297
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4283
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2699
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1909
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.