xsl-list
[Top] [All Lists]

replace &lt; and &gt; with < and >

2002-09-19 06:48:07
Hi,

I got a problem in my stylesheet.

The xml file is returned from a method is in a string format, and the xml file seems to encode all < and > using &lt; and &gt;. So, what I need to do is to convert that xml file from a string to a xml nodelist so I can access all the elements.

Then, first I need to replace all &lt; and &gt; to < and > and then use a method I wrote called parseXml which takes a string as parameter and convert it to a nodelist.

But I'm stuck on the first step which is converting all &lt; and &gt; to < and >.

Here is a sample of my xml file in a STRING:

&lt;record&gt;
&lt;items&gt;
&lt;/items&gt;
&lt;/record&gt;

Thanks in advance for your help.

Ming



XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list