Re: [xsl] converting encoded characters <, > etc

Subject: Re: [xsl] converting encoded characters <, > etc
From: Geert Josten <Geert.Josten@xxxxxxxxxxx>
Date: Wed, 01 Dec 2004 14:50:35 +0100
Set newNode = objNode.createNode(1, "OutField1", "")
newNode.Text = "<p>Hello World</p>"

Here is the cause of &gt; and &lt; appearing in your result. You pass < and > as literal text. They are escaped before being inserted in the DOM tree..

Why did I not parse through "<p>Hello World</p>" and derive some nodes from
there? Well, 'cos it can be any HTML tag and I'm not confident I'll be able
to create a template for all the tags that might appear.

I'm not sure we understand each other. What I meant is that you should try to do something like:

Set tempDoc = New DOMDocument40 (or some object like that)
tempDoc.loadXML("<p>Hello World</p>");


It shouldn't matter whether the <p> contains <a> elements or not, as long as the string you pass contains well-formed XML...

Good luck.


Current Thread