Skip to content
forked from jindw/xmldom

A PURE JS W3C Standard based DOMParser and XMLSerializer (DOM Level2 CORE).

Notifications You must be signed in to change notification settings

nightwing/xmldom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Another xml parser for nodejs/browser/rhino for java. Fully compatible with W3C DOM level2; and some compatible with level3. support DOMParser and XMLSerializer interface such as in browser.

Install:

npm install xmldom

Example:

var doc = new DOMParser()
    .parseFromString(
    '<xml xmlns="a" xmlns:c="./lite">\n'+
        '\t<child>test</child>\n'+
        '\t<child></child>\n'+
        '\t<child/>\n'+
    '</xml>'
    ,'text/xml');
doc.documentElement.setAttribute('x','y');
doc.documentElement.setAttributeNS('./lite','c:x','y2');
var nsAttr = doc.documentElement.getAttributeNS('./lite','x')
console.info(nsAttr)
console.info(doc)

About

A PURE JS W3C Standard based DOMParser and XMLSerializer (DOM Level2 CORE).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%