Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 2nd, 2011, 09:07 PM
Registered User
 
Join Date: Jan 2011
Posts: 1
Thanks: 1
Thanked 0 Times in 0 Posts
Default Format cdata text into xml

Hi,
I have data stored in cdata in one column in sql table.
After I retrieve it using data power i have 2 cdata added so i removed both of them using disable output escaping = true
Now I have the data in tags but it is in text format any suggestions to convert it to xml. I am not able to use any xml functions like parse etc since the data is in text.

step 1
data stored in sql -
<![CDATA[<Employee><Name>Nancy</Name><Age>25</Age></Employee>]]>

step 2
after using disable output escape i put in some tags as per my response schema

<EmployeeDetails>
<Address>USA</Address>
<Phone>1234</Phone>
<Employee1Details><Employee><Name>Nancy</Name><Age>25</Age></Employee><Employee1Details>
</EmployeeDetails>

We have text in Employee1Details tags so I am unable to parse it and have xml format instead of text.

Any suggestions please let me know.
Thanks in advance
Alisha
 
Old January 3rd, 2011, 07:23 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

I don't understand what the problem, please explain it in more detail. So far I understand that you have some escaped markup in a CDATA section and that you use disable-output-escaping to unescape the markup and get elements in the serialized result of your XSLT stylesheet. If that is not the desired result then please show the XML you want to create instead.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
The Following User Says Thank You to Martin Honnen For This Useful Post:
Alisha (January 3rd, 2011)





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to strip out CDATA from xml with XSLT XSLUSer XSLT 10 March 17th, 2009 11:28 AM
Using Xpath on an XML wrapped in CDATA akentanaka XSLT 4 March 11th, 2009 05:26 AM
SQL Server 2005 XML: FOR XML PATH -> cdata? stoves SQL Server 2005 1 July 8th, 2008 02:40 AM
Convert Rich Text Format to Ordinary Format in ASP Andraw Classic ASP Basics 1 August 31st, 2007 10:05 AM
CDATA Set with For XML Explicit Yehuda SQL Server 2000 0 August 13th, 2003 01:50 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.