[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: editing HTML inside <![CDATA[

Subject: RE: editing HTML inside <![CDATA[
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 19 May 2004 15:34:39 +0100
html cdata
> I have the following html code inside a xml file
> 
> 
> <SummaryHTML>
> <![CDATA[<html>
> <html>
> <body>
> .....
> .....
> </body>
> </html>
> ]]>
> 
> 
> but using this I can only get the raw html code into
> another html file but not able to access any nodes
> inside the html content.
> 

There are no nodes inside the CDATA section, there is only text. CDATA tells
the parser to treat the contents as text, not as markup.

Your choices are:

(a) avoid wrapping the HTML in CDATA in the first place (in which case you
will have to make sure it is well-formed XML, by putting it through the tidy
utility)

(b) extract the HTML from the CDATA as text, and parse it to turn it into a
tree of nodes. Saxon offers an extension saxon:parse to do this (but this
again relies on it being well-formed XML).

MIchael Kay

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.