For example, when the following XML document ...
<?xml version="1.0" encoding="windows-1250"?>... is transformed into a DOM tree and processed with this JavaScript function:
<?xml-stylesheet href="countryPage.xsl" type="text/xsl"?>
<Test />
function testPI(dom) {... Internet Explorer generates the following text:
var topNodes = dom.childNodes;
for (var i = 0; i < topNodes.length; i++) {
var node = topNodes[i];
wr("nodeType="+node.nodeType);
if (node.nodeType == 7) {
wr("PI="+node.target+" ... "+node.data);
}
}
nodeType=7... while Firefox skips the <?xml ?> processing instruction:
PI=xml ... version="1.0" encoding="windows-1250"
nodeType=7
PI=xml-stylesheet ... href="countryPage.xsl" type="text/xsl"
nodeType=1
nodeType=7
PI=xml-stylesheet ... href="countryPage.xsl" type="text/xsl"
nodeType=1