1 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 <script type=
"text/javascript">
7 testRunner
.dumpAsText();
9 var target
= document
.getElementById("target");
11 var xmlns
= "http://www.w3.org/XML/1998/namespace";
13 // XML with correct xml prefix on space
14 var xml1
= document
.createElementNS(xmlns
, "foo");
15 xml1
.setAttributeNS(xmlns
, 'xml:space', 'preserve');
17 var xml2
= document
.createElementNS(xmlns
, "bar");
18 xml2
.setAttributeNS(xmlns
, 'space', 'default');
20 target
.appendChild(xml1
);
21 target
.appendChild(xml2
);
23 var serializer
= new XMLSerializer();
24 var xmlString
= serializer
.serializeToString(target
);
26 var outputText
= document
.getElementById("output");
27 outputText
.textContent
= xmlString
;
31 <body onload=
"runTest()">