473,396 Members | 1,987 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,396 software developers and data experts.

Best way of adding another node into an XML document?

I just need to add a new node whenever someone enters new data on a
page. This doesn't involve any editing of existing nodes in the XML
document. I was wondering whats the "BEST" way to perform this.

I was thinking of a dataset but its unneccessary to read all the
values into the dataset.

Thanks
Nov 12 '05 #1
1 2388
ree32 wrote:
I just need to add a new node whenever someone enters new data on a
page. This doesn't involve any editing of existing nodes in the XML
document. I was wondering whats the "BEST" way to perform this.

I was thinking of a dataset but its unneccessary to read all the
values into the dataset.


The best way is to use XML fragment instead of XML document. Then you
can merely add new nodes to the end of file. See my sample at
http://www.tkachenko.com/blog/archives/000053.html

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #2

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

Similar topics

1
by: Jay Sartoris | last post by:
Hi, I'm adding a node to my XML document using DOM. When I serialize it, I lose my comments that are above my root node. I've created an OutputFormat obect and set the setOmitComments(false)...
2
by: Weston C | last post by:
I'm wondering if it's possible to add a method to the Node and/or Element objects (so they'd subsequently be available to any node/element). I'd assume you could just do something like: ...
1
by: Joel Byrd | last post by:
I am having a problem adding a node to the page. This works on other browser (Opera, Firefox, etc.), but not in IE. The following is the function to add the node: (the id "test_div" is a...
7
by: Joseph Scoccimaro | last post by:
Currently I am trying to use JavaScript within greasemonkey to dynamically put a menu at the top of each page. I am running in to trouble when I try to append a node representing a script tag to...
8
by: Ian Collins | last post by:
Is there a way to do this in IE? In Firefox, one can simply append a node from an XML return to the current document. IE whinges about 'No such interface supported' -- Ian Collins.
5
by: yawnmoth | last post by:
I'm having some difficulty with adding elements to a webpage via the DOM. The following works: main.htm: <script> js = document.createElement('script'); js.src='test.js';...
5
by: Jonathan | last post by:
Hello All, I am in the process of creating a 2/3 level collapsible/exspanible menu (called "nav") where users can click on a category and have the submenus appear beneath it and so on (allow...
2
by: Holger Jeromin | last post by:
Hello, i need to add SVG things direct in a Website. I know XHTML is best used for that, with works nice in Firefox and Opera. Internet Explorer is more challenging... I have ported my...
10
by: AC | last post by:
I had a page that does some event setup on window.onload: function prepEvents() { document.getElementById("menumap_sales").onmouseover = swapMenuSales; // etc } window.onload = prepEvents;
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...

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.