var wows = require('vows');
var XMLSerializer = require('xmldom').XMLSerializer;
var DOMParser = require('xmldom').DOMParser;
// Create a Test Suite
wows.describe('XML Namespace Parse').addBatch({
'clone': function () {
var doc1 = new DOMParser().parseFromString("text1text2",'text/xml')
var n =doc1.cloneNode(true)
console.assert(n == new XMLSerializer().serializeToString(doc1))
},
'import': function () {
var doc1 = new DOMParser().parseFromString("")
var doc2 = new DOMParser().parseFromString("text1text2",'text/xml')
var doc3 = new DOMParser().parseFromString("text1text2")
var n =doc1.importNode(doc2.documentElement, true)
doc1.documentElement.appendChild(n)
console.assert(doc1 == doc3+'')
console.assert(doc2 != doc3+'')
}
}).run(); // Run it