Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Corejava boy on Jan 16, 2008 13:46
open dhtmlx forum
loads in mozilla but not IE

In continual of the earlier question , can you suggest me how to provide UTF encoding for the xml

Thanks
I am working on tree, The page open in mozilla but in IE it gives error,
I am loading xml with string

my earlier question

I get the syntax error at this line

tree.loadXMLString(<%= resultString %>);


Answer posted by Support on Jan 16, 2008 07:16
IE XML engini has limitation, it can parse only UTF based XML from string, so you can't use loadXMLString command with custom encoded XML.
If problem occurs with UTF encoded XML - please provide exact XML value.

Thanks
Answer posted by Support on Jan 17, 2008 02:29
>>to provide UTF encoding for the xml
The XML will be parsed correctly if it
    a) has not encoding attribute
    b) encoding attribute set to utf-8
Answer posted by corejavaboy on Jan 17, 2008 13:29

I have provided UTF encoding for xml, but it doesnt work in IE, Can I use loadXMLString for IE,

Do you suggest any other way to load xml directly to the tree.

I am

Answer posted by corejavaboy on Jan 17, 2008 13:37

I have provided UTF encoding for xml, but it doesnt work in IE, Can I use loadXMLString for IE,

Do you suggest any other way to load xml directly to the tree.

I get xml from a XSL transformation class,  (say xsl.java)

and the result xml I need to load to the directly.

 <%

 XslTransformer xslTrans = new XslTransformer();

 String resultString = xslTrans.XsTransformer();

 resultString = resultString.substring(resultString.indexOf("<tree"));

 System.out.println("the result xml in string format is"+resultString);

%>

tree.loadXMLString(<%= resultString %>);
Your support team has suggested as foolows , but even this did not work in IE

<textarea id="for_xml" style='display:none'><%= resultString %></textarea>

<script>
    tree.loadXMLString(document.getElementById('for_xml').value);
</script>

 

Thanks

 

Answer posted by Support on Jan 18, 2008 02:20
The XML which you posted previosly contains logical errors - for example it has elements without ID

...
<item text="&#10; module&#10; &#10; ">
...

each element in tree must have unique ID