Re: XML Islands in Firefox



tomicmi...@xxxxxxxxx wrote:

I have this HTML:

<html>
<head>
<style type="text/css">
xml {display: none;}
</style>
<script language="JavaScript">
function test() {
  alert(document.getElementById("zahtevek").innerHTML);}>
</script>
</head>
<body>
<div><xml id="zahtevek"><cd:Document xmlns:cd="http://
Document"><cd:Data  Id="Data"/></cd:Document></xml></div>
<input type="button" name="Test" value="Test" onclick="test()">
</body>
</html>

Well, the problem is that innerHTML returns lower case XML
(cd:document instead of cd:Document...) and I need to preserve XML (it
shouldn't be modified in any way).

You cannot trust innerHTML to return the correct XML. Please see:

http://www.w3schools.com/xml/xml_parser.asp

Hope this helps,

--
Bart
.


Quantcast