xml transformation convert "<" or ">" value to &lt or &gt

G

Guest

I do xml / xslt transformation using asp.net but I found
any value (w/xml format) in xml node html-encoded to &lt and &gt format if
it's > or < tag.
Since I have sub xml data in a parent xml node as a value.
Check out the following problem. I want to convert the value in <WpDatesXml>
node to have a valid "<" and ">" instead of &lt or &gt format so that I can
use this xml for another use. Please help!

<NewDataSet>
<Table1>
<Title>The power deal note</Title>
<ShortBodyText>&lt;p>Lorem ipsum dolor sit amet, consectetuer adipiscing
elit. In lobortis adipiscing nulla. Pellentesque condimentum, wisi a
scelerisque vulputate, quam sapien iaculis dui, vel ullamcorper arcu ante
quis leo. Class aptent taciti sociosqu </p></ShortBodyText>
<PublishedDate>2005-10-21T00:00:00.0000000-07:00</PublishedDate>
<WeeklyPreview>True</WeeklyPreview>
<WpDatesXml><Zones><Zone>10/28/2005 Issue</Zone><Zone>11/18/2005
Issue</Zone><Zone>12/2/2005 Issue</Zone></Zones></WpDatesXml>
<startdate>10/29/2004 9:25:20 PM</startdate>
<expirydate>1/1/3000 12:00:00 AM</expirydate>
<lastmodifieddate>10/28/2005 11:27:45 PM</lastmodifieddate>
</Table1>
</NewDataSet>
 
G

Guest

The only reason I am doing is because each node of xml is actually a
placeholder in mscms. I grab cms placeholder data from a template and create
a dataset out of it and convert to xml format and try to transform w/xslt.
<WpDatesXml> is actually xml data type and supposed to be reused for another
db manipulation. I can't touch database since it's all mscms.
 
K

Kevin Spencer

How about using <xsl:element>WpDatesXml</xsl:element>

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
A watched clock never boils.
 
Top