473,416 Members | 1,498 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

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 6810
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
4
by: matatu | last post by:
Hi to all, I have a xml file, a substring like: &lt;a href=&quot;#&quot;&gt;text&lt;/a&gt; which after an xslt trasform is rendered as (using xsl:output method html): &lt;a...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
2
by: Laermans_k | last post by:
Hi, Does anyone have a solution to use the <input type="file" id="filechooser"> and the <input type="submit" id="submitbutton"> in 1 button click? I've already tried to create a javascript...
1
by: citnamor | last post by:
Hello, I'm trying to access a webservice which runs on our SOAP Server (Apache Tomcat) with Windows 2000 Advanced Server. I simply added the webreference local copy of wsdl file into dotNet...
2
by: junkblog747 | last post by:
What will the expression "/.." in the attribute select="/.." return? I just inherited a huge stylesheet to maintain which has a lot of parameters such as <xsl:param name="myParam"...
4
by: dominique | last post by:
Hello All, In a wx GUI, I would like to let the user choose between >, < or =. So, I created a combobox and when the user chooses ">" for instance, I wanted to return (the objective is to send...
1
by: ismailc | last post by:
Hi, I need help please. Update system to to new version & moved on to .Net2 But now my code that worked in my .Net1 xslt does not work. .Net1 fine: <xsl:stylesheet...
2
by: santaji | last post by:
I am getting xml string in request attribute in following format &lt;files&gt; &lt;file&gt; &lt;filename&gt;somefile.ext&lt;/filename&gt; &lt;/file&gt; &lt;files&gt; the above string I want to convert to tags. expected...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.