[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Issues with Packaging Application Payloads
David Ezell <David_E3@V...> wrote: >> Then there's #4, the *RIGHT WAY* to do this, which is: A) Before inserting >> your arbitrary text into your XML wrapper, run it through a filter that >> replaces & with &, < with <, and > with >. B) Before handing >> arbitrary text back to the user, run it through a filter that replaces < >> with <, > with >, and & with &. >> >> Voila, the problem is solved. You don't have the byte bloat of base64, you >> don't have the limitation of not including ]]> in CDATA, and you don't have >> to mess up validation. >> > Not a bad idea for simple uses, but it won't nest (at least I don't think it > will): the export filter would convert all the PCDATA at once. It seems to > me a safe bet that if you need to nest one level, you'll have use cases for > nesting to N levels. I don't understand -- couldn't you just use &? Original: <text/> One level: <text/> Two levels: &lt;text/&gt; Three levels: &amp;lt;text/&amp;gt; -- Aaron Swartz | me@a... | http://www.aaronsw.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|