Re: XML Islands in Firefox
- From: Bart Van der Donck <bart@xxxxxxxxxx>
- Date: Wed, 30 Jan 2008 02:51:37 -0800 (PST)
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
.
- Follow-Ups:
- Re: XML Islands in Firefox
- From: tomicmilan@xxxxxxxxx
- Re: XML Islands in Firefox
- References:
- XML Islands in Firefox
- From: tomicmilan@xxxxxxxxx
- XML Islands in Firefox
- Prev by Date: XML Islands in Firefox
- Next by Date: Re: XML Islands in Firefox
- Previous by thread: XML Islands in Firefox
- Next by thread: Re: XML Islands in Firefox
- Index(es):