Create an XML DOM in Firefox

Home arrow AJAX Tutorials arrow Tutorial arrow Create an XML DOM in Firefox
Create an XML DOM in Firefox Print E-mail
Contributed by Teddy   
Tuesday, 19 September 2006
The Firefox has many features for XML developers, including XML parsing, XHTML, CSS, XSLT, SVG, XML Events in JavaScript™..This tutorial will tell you how to create an XML DOM in Firefox

First call the createDocument() method of the document.implementation object

This method takes three arguments:

  • The first is a string containing the namespace URI for the document to use,
  • The second is a string containing the qualified name of the document's root element,
  • The third is the type of document  to create.

To create an empty DOM document

 var foxXmlDom = document.implementation.createDocument("", "", null);

To creates an XML DOM whose documentElement is <address/>

var foxXmlDom = document.implementation.createDocument("", "address", null);

To creates an XML DOM specifying a namespace

var foxXmlDom = document.implementation.createDocument("http://www.sourceside.com","address",null);

Last Updated ( Tuesday, 19 September 2006 )

  home              contact us

 

©2006-2012 DeveloperZone.biz   All rights reserved     powered by Mambo Designed by Siteground