By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,428 Members | 1,159 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,428 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies

P: n/a
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

P: n/a
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.