XML in HTML4

Tony's HTML4 Course


Custom Tag
Inline XML
Linking XML

star pic Custom Tag

Declaring a XML Namespace
<html xmlns:#>...</html>
      #=namespace


Declaring a Tag name and Style
<style> #\:TAG {Style-Declaration} </style>
      #=namespace, TAG=custom tag name


Use Custom Tag
<#:TAG>...</#:TAG>
      #=namespace, TAG=custom tag name


<HTML XMLNS:TEST>
<HEAD>
<STYLE>
    TEST\:RED {color:red}
</STYLE>
</HEAD>
<BODY>
<H1>Custom Tag Test</H1>
<TEST:RED>This text will be a red color.</TEST:RED>
</BODY>
</HTML>



star pic Inline XML

XML data can be included in an HTML document to script against it.
Nothing will happen without scripting.

<xml ID=#> ..xml data.. </xml>

ex.
<XML ID="SAMP"> <member> <name>Netwrok Communication Design</name> <email>msg@ncdesign.org</email> </member> </XML> <INPUT TYPE=button VALUE="Member Name" onClick="alert(SAMP.XMLDocument.documentElement.childNodes.item(0).text)"> <INPUT TYPE=button VALUE="E-Mail Address" onClick="alert(SAMP.XMLDocument.documentElement.childNodes.item(1).text)">
Netwrok Communication Design msg@ncdesign.org


<script language="xml" ID=#>
..xml data..
</script>

ex.
<SCRIPT LANGUAGE="xml" ID="SAMP1"> <member> <name>NCDESIGN</name> <email>Not Available</email> </member> </SCRIPT> <INPUT TYPE=button VALUE="Member Name" onClick="alert(SAMP1.XMLDocument.documentElement.childNodes.item(0).text)"> <INPUT TYPE=button VALUE="E-Mail Address" onClick="alert(SAMP1.XMLDocument.documentElement.childNodes.item(1).text)">


star pic Linking XML

<xml ID=# src=#></xml>

ex.
<XML ID="SAMP2" SRC="samp/sample.xml"></XML> <INPUT TYPE=button VALUE="Member Name" onClick="alert(SAMP2.XMLDocument.documentElement.childNodes.item(0).text)"> <INPUT TYPE=button VALUE="E-Mail Address" onClick="alert(SAMP2.XMLDocument.documentElement.childNodes.item(1).text)">




Back to Top

Back to HTML Index Page

Page | Font | Text | Image | Form | Table | Frame | Objects | XML

Please e-mail me at:d4188@hotmail.com
<script language="JavaScript">document.write("<no" + "script>")</script> </HTML>