I have a problem with parsing XML.
I have six listBoxes on dialog window - every one has a parent and a child listbox.
They all need to relod values, without refrshing page.
So, I found a solution - first I load an XML file from server:
--------------------------------------------------------------------------
var req;
function loadXMLDoc(url,funkHandle) {
// branch for native XMLHttpRequest object
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange = funkHandle;
req.open("POST", url, true);
req.send(null);
// branch for IE/Windows ActiveX version
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) {
req.onreadystatechange = funkHandle;
req.open("POST", url, true);
req.send();
}
}
}
------------------------------------------------------------------
------------------------------------------------------------------
then I need to parse it to get DOM object. I can clearly parse it by
Mozilla using DOMParser().
But in IE I meet a problem - ActiveXObject ( Microsoft.XMLDOM )
do not whants to parse it .
XML looks like:
------------------------------------------------------------------
<?xml version="1.0" encoding="windows-1257" ?>
<objects>
<kod val='323'>234234 - some Latvien tekst</kod>
<kod val='323'>234234 - some Latvien tekst</kod>
</objects>
------------------------------------------------------------------
------------------------------------------------------------------
Also I send additional headers:
------------------------------
Content-Type: text/xml
Encoding: windows-1257
------------------------------
------------------------------
And more - even in Mozilla in place of national characters
I see 2 simbols replaced (somewhere it was transfered in Unicode?)
Please help )