Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


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

From: "Wong Chin Shin" <publicbbs@---------------->
To:
Date: 12/1/2004 2:07:00 PM
I see what you mean :) yes, indeed that would work. No, I did not know about
loadXML() before this. The methods available to me via MS' XMLDOM was not
known to me before this and I could only try each relevant method I could
find in the W3C DOM specs and see if it worked in MS' implementation. Color
me frustrated...

Well, I finally found a good library on the MS XMLDOM implementation: 

http://www.devguru.com/Technologies/xmldom/quickref/xmldom_intro.html

yes!!!

Thanks, Geert!!

Wong


-----Original Message-----
From: Geert Josten [mailto:Geert.Josten@xxxxxxxxxxx] 
Sent: Wednesday, December 01, 2004 9:51 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] converting encoded characters <, > etc


> 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>");

objNode.addChild(tempDoc.firstChild);

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.

Geert


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent