A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
OCA Java SE 8 Programmer I Study Guide
this week in the
Joined: Sep 27, 2005
Feb 24, 2006 05:27:00
Veshnu<br />SCBCD<br />SCWCD<br />SCJP
Joined: Feb 20, 2006
Feb 24, 2006 06:00:00
To create an XML document in IE:
var xmlDoc = new ActiveXObject( "Microsoft.XmlDom");
To load something in the document you can load it by referencing the file
xmlDoc.load( URL), or
xmlDoc.load( str) where str is a valid XML document.
The result is an XML DOM document that can be manipulating like the XML DOM.
In Mozilla you need the following line
var xmlDoc = document.implementation.createDocument( namespace, rootElement, null);
The result is an XML document with namespace, and rootElement that can be manipulated using the standard XML DOM methods.
For exact details of the methods I would reference the XML DOM documentation.
Then to save the XML to a
, for IE you use the xml property associated with a node, and for Mozilla you use the XMLSerializer object.
[ February 24, 2006: Message edited by: Christian Gross ]
Author of Ajax Patterns and Best Practices
I agree. Here's the link:
advise on using XML in the application
Unexpected call to method or property access.
constructing xml from values in database
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015