Table of Contents

XML Cheat Sheet

I stumble across XML documents intermittently and every time I need to review the basics again. This is a cheat sheet so that I can review it whenever I need to. This is a summarized form of the XML Tutorial.

Also see the following related cheat sheets :

For reference this is the XML Specification and the version annotated by Tim Gray.

What is XML

XML Syntax

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE note SYSTEM "InternalNote.dtd">
<note date="12/11/2002">
  <to>Alice</to>
  <from>Bob</from>
  <par>Hi.</par>
  <par>Bye.</par>
</note>

XML Validation

XML Elements

XML Attributes

XML Namespaces

<h:table xmlns:h="http://www.w3.org/TR/html4/">
   <h:tr>
     <h:td>Apples</h:td>
     <h:td>Bananas</h:td>
   </h:tr>
</h:table>

XML Stylesheets

<?xml-stylesheet type="text/css" ref="simple.css"?>
<?xml-stylesheet type="text/xsl" href="simple.xsl"?>

Assorted