Any XML expert..?help.....

Z

zheetee

i am a XML beginner.....
i know that we can put CData to preserve the space between character
in XML.so when u open the xml file by using Internet Explorer,
everything will displayed correctly with preserve all the space.

but when u pass the xml's variable to html code and display in
internet explorer.it won't preserve the space any more.

For example:
this is a html code that imported varible from xml to html code and
display in Internet Explorer....

html:

<script type="text/javascript">
function testclick(field)
{
var row=field.rowIndex
xmldso_list.recordset.absoluteposition=row
td_sum.innerHTML=xmldso_list.recordset("sum")
td_step.innerHTML=xmldso_list.recordset("step")
td_more.innerHTML=xmldso_list.recordset("more")
td_ref.innerHTML=xmldso_list.recordset("ref")
td_app.innerHTML=xmldso_list.recordset("app")

}

function test1()
{

td_sum.innerHTML=window.opener.document.getElementById("td_sum").innerHTML
td_step.innerHTML=window.opener.document.getElementById("td_step").innerHTML
td_more.innerHTML=window.opener.document.getElementById("td_more").innerHTML
td_ref.innerHTML=window.opener.document.getElementById("td_ref").innerHTML
td_app.innerHTML=window.opener.document.getElementById("td_app").innerHTML

}
</script>
</head>



<table>
<pre>
<tr><td><b>sum: </b></td></tr>
<tr><td id="td_sum"></td></tr>

<tr><td><b>step: </b></td></tr>
<tr><td id="td_step"></td></tr>

<tr><td><b>more: </b></td></tr>
<tr><td id="td_more"></td></tr>

<tr><td><b>ref:</b></td></tr>
<tr><td id="td_ref"></td></tr>

<tr><td><b>app:</b></td></tr>
<tr><td id="td_app"></td></tr>
</pre>
</table>


xml:

<set>
<td_newf><![CDATA[
1
2
3
]]>
</td_newf>
</set>

so when the html executed.it will displayed the td_newf(long article)
1 2 3 so it will not preserve all the space on internet explorer
however i was put <pre> inside html code.....

but i want the html display td_newf on IE like:
1
2
3


Any solution for this problem......?thank you... :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top