473,320 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Edit XML File

BiT
Hello

I Know how to create and add elements to xml file with XmlTextWriter, here
is code for example:
Dim textWriter As XmlTextWriter = New XmlTextWriter("table.xml", Nothing)

' Opens the document

textWriter.WriteStartDocument()

' Write comments

textWriter.WriteComment("Database")

' Write first element

textWriter.WriteStartElement("R_DataBase")

textWriter.WriteString("test")

textWriter.WriteEndElement()

' Ends the document.

textWriter.WriteEndDocument()

' close writer

textWriter.Close()

I Would like to know if there's way to edit xml file i mean to open the file
and then to add or remove elements from it. beacuse right now my program
make a new xml file everytime i need to save the file

May 23 '07 #1
1 2376
BiT wrote:
I Would like to know if there's way to edit xml file i mean to open the
file and then to add or remove elements from it. beacuse right now my
program make a new xml file everytime i need to save the file
You can use System.Xml.XmlDocument to load the XML document into a DOM
tree model where you are then able to add/delete/manipulate nodes and
save the tree model back to a file.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
May 23 '07 #2

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

Similar topics

6
by: matt | last post by:
I am using a text file as a database, each field delimited by || I want to be able to print all lines to a page, then by selecting one (with, say, a radio button) it will load into the form at the...
1
by: Tom | last post by:
Hello I am a newbie to VB .net 2003 environment. I have a database in sql server 2000 that was developed using vb. I would like to edit some of the .exe files that are used to collect and...
0
by: Alex | last post by:
Interested in more .NET stuff visit www.dedicatedsolutions.co.uk The DataList is not as powerful as the DataGrid. It requires more work from you since it has no default data presentation format....
4
by: Glenn M | last post by:
I have a shared XML file on a server . i also have one xslt file that performs a simple transform on in to view the data. now i want to have another page that lets users modify the shared xml...
0
by: colin.steadman | last post by:
If I right click on a ASP file in Explorer and choose EDIT, Windows opens a new instance of MSE.EXE and opens the file in that. What I'd like it to do is simply goto the existing open MSE...
1
by: KJ | last post by:
I am building an ASP.NET 2.0 Web Site in VS 2005 Team Edition SP1. Every time I edit any HTML (not just server controls, even if I edit a div), or even if I edit the stylesheet (yes, the .css...
4
by: Sanchit | last post by:
I want to know thta how can i edit a file in C++ For Example my file is Mr XyZ FFFFFF 65 And now i want go change this number 65 to 87.... how can i Do this..... I...
1
by: ollielaroo | last post by:
Hi guys, Firstly I did do a search for this one first but I couldn't find anything related in this forum. I am using Dreamweaver MX and trying to build admin pages for an ASP site. My problem is...
1
by: Xicon | last post by:
I am looking to create a program that is able to edit a text file that is not located within the program. This particular text file is always in the exact same location and is always named the exact...
1
by: Primo | last post by:
I'm trying to figure out how to make some small text changes to my website, but don't have any experience doing it. I've managed to figure out that the file which needs to be changed has an SWF...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.