OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: how do i...

[ Lists Home | Date Index | Thread Index ]
  • From: Wayne Steele <xmlmaster@hotmail.com>
  • To: rsanford@nolimitsystems.com, xml-dev@lists.xml.org
  • Date: Mon, 16 Oct 2000 15:29:58 -0700 (PDT)

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@nolimitsystems.com>
>To: xml-dev@lists.xml.org
>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.





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS