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

Re: How to allow < > % within xml

Subject: Re: How to allow < > % within xml
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 16 May 2000 21:34:33 -0600 (MDT)
allow in xml
> To allow html tags with in html content , we do have htmlencode . similarly 
> do we have any method to allow the special characters like < > % to be 
> allowed within a xml content .
> 
> Ex : <Address> My new % Address <just> </Address>

% has no special meaning in XML, outside of a DTD, so it does not need to
be escaped. Characters that do need to be escaped are < > & and in certain
uncommon situations ' and ". They need to be escaped because they are used
to delineate markup from character data. &lt; &gt; &amp; &apos; &quot; are
the escaped forms of the characters.

	<Address> My new % Address &lt;just&gt; </Address>

The other option is to use CDATA sections, whose only purpose is to
avoid the need to escape the markup characters:

	<Address><[!CDATA[ My new % Address <just> </Address>]]>

There are many other requirements for well-formedness that are detailed in
the XML 1.0 Recommendation. In the future, please direct general XML
questions to a more appropriate forum, like the comp.text.xml newsgroup.

   - Mike
___________________________________________________________
Mike J. Brown, software engineer, Webb Interactive Services
XML/XSL stuff: http://www.skew.org/    http://www.webb.net/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.