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

RE: how do i...

  • From: rsanford <rsanford@n...>
  • To: xml-dev@l...
  • Date: Mon, 16 Oct 2000 18:13:21 -0500

rjsjr
okay, i'm showing that i'm an xml newbie but i'm confused.

what's the difference between declaring an element having
CDATA content and using a CDATA section?

can i declare that my element will contain a CDATA section
in a schema? if so, how?

also, not quite related, is it valid for a CDATA section,
not the same one, to contain binary data? if so, are there
restrictions the binary data must conform to (no null values
for instance)?

rjsjr

> -----Original Message-----
> From: Wayne Steele [mailto:xmlmaster@h...]
> Sent: Monday, October 16, 2000 5:30 PM
> To: rsanford@n...; xml-dev@l...
> Subject: Re: how do i...
> 
> 
> rjsjr:
> 
> You cannot declare an Element as having CDATA content (although 
> you can in 
> Full SGML).
> 
> If you want the content of an element to look like XML, but have the 
> software just pass it through as text, you need to use Entity 
> References ( a 
> la &lt; ) or use a CDATA Section.
> 
> <element><![CDATA[
>    I am text.
>    <not_a_start_tag>.
>    &not_an_entity_reference;.
>    <?not a PI?>
>    <data>some more text</data>
>    <!-- no comments either -->
>    I am still just raw text.
> ]]></element>
> 
> -Wayne Steele
> 
> >From: rsanford <rsanford@n...>
> >To: xml-dev@l...
> >Subject: how do i...
> >Date: Mon, 16 Oct 2000 15:09:48 -0500
> >
> >include XML data as text within an element. what i want is
> >given the following simplified xml:
> >
> >    <element>
> >       <xml_data>
> >          other text
> >       </xml_data>
> >    </element>
> >
> >when i request the text data for <element> have the entire
> >content below that be returned rather than have <xml_data>
> >be considered as an element.
> >
> >do i simply declare <element> to contain CDATA or do i
> >have to manually escape the content of <element> so that
> >all the < are translated to &lt; (and so forth and so on)
> >or do i need to do both?
> >
> >rjsjr
> >
> >
> 
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
> 
> Share information about yourself, create your own public profile at 
> http://profiles.msn.com.
> 

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.