• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 36. XML-Related Technologies and... > Scripting an XML Document: <html:scr...

Scripting an XML Document: <html:script />

Yes, you can use JavaScript with XML documents! The requirements are fairly modest: a namespace and the element. Unfortunately, only Netscape 6 browsers support it. Listing 36.4 uses a namespace to enable scripting.

Note

Outside of browsers, it is not typical to add HTML scripting to an XML document. I do so here because I examine XML documents from the scope of a Web browser.

Also, some XML languages have JavaScript or ECMAScript support built in natively. SVG is one such language; the <html:script /> element is not necessary or advisable in these circumstances.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint