Creating XML nodes via DOM
Guys, Im in a sort of a... tag.
According to w3schools.com, in order to create nodes in XML, all one has to do is
... And that should do it. But, and a very big But indeed, it doesn't create at all. No new elements in the XML document, no appending whatsoever.
xmlDoc=loadXMLDoc("archive.xml")//xml reader parser
var p_root=xmlDoc.getElementsByTagName("root") //XML archive's root
AND, no help from the Mozilla's Error Console (ctrl+alt+j) either.
Hope that helps...
Yes, wel... The data *are* being processed via HTML Form, with no server-side client (sucha as Asp), wihch, I have to say, I'm inclined to change.
When you say "save in a document", you mean, by server applications, right?
It was a general comment for XML, but in your case yes.
Basically, unless there is something which is representing a live version of the DOM you will not see any changes unless the DOM you are modifying is saved back to either the file that you loaded or a new file. When the DOM is modified using appendChild() etc. it is only amending the in memory version of the DOM.
By JCGrafted in forum XML
Last Post: 03-09-2010, 11:20 AM
By harish13 in forum VB Classic
Last Post: 07-25-2006, 11:43 PM
Last Post: 06-14-2001, 12:19 PM
By Mark Dempsey in forum XML
Last Post: 07-26-2000, 04:28 PM
Last Post: 03-22-2000, 09:09 AM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL