|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Is it possible to include JavaScript...in an XML file...?
tariq abdur-rahim wrote: > Quicc question...Is it possible to include JavaScript "source code" in an XML > file and have it displayed as parsed data as opposed to it trying to perform > a function? Heh. Yes. In fact, that's the default behaviour: data in an XML document doesn't _do_ anything on its own until some process interprets it. Also, you may find the <![CDATA[ ... ]]> construct helpful. Inside a CDATA section, you don't have to escape &, <, or >, so you can basically copy-and-paste whatever you want as long as it doesn't contain the closing delimiter "]]>". Quoting <URL: http://www.flightlab.com/~joe/sgml/faq-not.txt>, section 3, question 2: | Q. How do I include JavaScript inside an XML document? | | A. Easy! Just write: | | <code notation="JavaScript"><![CDATA[ | ... your JavaScript code goes here ... | ... make sure it doesn't contain the sequence "]]>"... | ]]> | </code> This is the first time I've ever heard anyone ask that question who was expecting that answer though... --Joe English jenglish@f...
|
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
|
|||||||||

Cart








