O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Scripting XML Elements

Internet Explorer provides limited support for scripting XML elements. For example, I can add an onclick event attribute to an XML element named <xlink> (we'll take a look at XLinks later in this book) in an XHTML document (we'll also take a look at XHTML later in this book):

Listing . ch07_12.html
 
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet TYPE="text/css" href="ch07_13.css"?>

<html>
    <head>
    </head>

    <body>
    Want to check out <xlink xml:link = "simple" inline="false"
					href = "http://www.w3c.org"
					onclick="location.href='http://www.w3c.org'">W3C</xlink>?
    </body>
</html>

I can specify in a stylesheet, ch07_13.css, that <xlink> elements should be displayed in blue and underlined as a hyperlink might appear. I can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required