If you just want to *display* it, like an image,
document.getElementById('Y
will work, where "text" is your string.
If you want the browser to *interpret* it, then
document.getElementById('Y
is one solution.
Main Topics
Browse All TopicsHi,
My Xml contains encoded HTML, as in the below snippet.
How can I get this to be parsed properly to display correctly in the browser?
I have tried setting disable-output-escaping="y
I'm thinking a JavaScript function is the way to go, but don't know where to start.
Cheers,
Wayne
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
If you just want to *display* it, like an image,
document.getElementById('Y
will work, where "text" is your string.
If you want the browser to *interpret* it, then
document.getElementById('Y
is one solution.
It sounds to me like you don't actually want to use disable-output-escaping="y
If I use disable-output-escaping="y
<P>some text:</P><P> </P><P>more text item1>item2>item3> something & something</P>
...with the html being....
<P>some text:</P><P> </P><P>more text
item1&gt;item2&gt;
If I use disable-output-escaping="n
Hmm... assuming we've got all the escaping issues with experts-exchange worked out =)... I think I see the problem now--the data is already escaped for HTML once. disable-output-escaping="y
You may need to play around with the "node.item(0).text" part depending on what you are passing into the function.
Hope this helps.
When I try that I get this error....
The URI http://localhost/mynamespa
How do I overcome this? Sorry if I'm being a little daft - I only started XSLT yesterday.
Wayne
So what generates the error message "The URI http://localhost/mynamespa
The "Java" part makes me think Xalan, in which case, this guide will help:
http://xml.apache.org/xala
Hmm... okay... let's try a different route then. Problem is, even if it is Xalan underneath, there's a chance the JavaScript extensions aren't included.
At this point, I'd recommend seeing if XSLT 2.0 is support. If it is then you don't need JavaScript, just need "fn:replace" calls, as below. Change "input" below to whatever you were selecting before.
To switch to "XSLT 2.0", if it isn't already, you'll have to change version="1.0" to version="2.0" in the xsl:style-sheet element. You may also need to tell EditiX that it is an XSLT 2.0 file--as I've never used EditiX before, you're on your own there.
I hope this works. =)
Business Accounts
Answer for Membership
by: neerajsoniPosted on 2009-05-30 at 08:01:54ID: 24509188
These are the char coded forms and taken care by the browser if they appear in html source.
If you have it in xml I guess you prolly want an xslt that will transform your xml into xhtml to display data.
The rendering will take place at browser end and these chars will be displayed as you need them to.