469,616 Members | 1,823 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

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

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>
Nov 19 '05 #1
2 6338
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.

"andrew007" wrote:
I do xml / xslt transformation using asp.net but I found
any value (w/xml format) in xml node html-encoded to < and > 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 < or > format so that I can
use this xml for another use. Please help!

<NewDataSet>
<Table1>
<Title>The power deal note</Title>
<ShortBodyText><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>

Nov 19 '05 #2
How about using <xsl:element>WpDatesXml</xsl:element>

--
HTH,

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

"andrew007" <ga****@yahoo.com> wrote in message
news:B5**********************************@microsof t.com...
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>

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Christian Schmidbauer | last post: by
4 posts views Thread by matatu | last post: by
2 posts views Thread by Donald Firesmith | last post: by
4 posts views Thread by dominique | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.