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

Thanks joe (WAS: How do I include JavaScript inside an XML document?)


javascript inside xml

Hey joe:

Thanks for the quicc response.  This helps alot.

Appreciate it,

 Joe English wrote:


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 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 ,
section 3, question 2:

| Q. How do I include JavaScript inside an XML document?
|
| A. Easy! Just write:
|
|
| ... your JavaScript code goes here ...
| ... make sure it doesn't contain the sequence "]]>"...
| ]]>
|



This is the first time I've ever heard anyone ask that question
who was expecting that answer though...


--Joe English

jenglish@f...

-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org , an
initiative of OASIS

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager:


t a r i q   a m i n   a b d u r - r a h i m

--  i am what's next!



Do you Yahoo!?
New http://rd.yahoo.com/evt=1207/*http://sbc.yahoo.com/ from SBC & Yahoo!

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.