XMLDocs Basics

Since XMLDOCS is based on DocBook XML, the usual DocBook XML rules apply: XML markup consists of XML "tags" (same style as HTML tags), but all of which must be opened (and closed — you cannot omit the closing tag) respecting the hierarchy of tags within a document. In addition, attributes must always be quoted. These two rules are non-negotiable with DocBook XML. Here's an example:

<?xml version="1.0" standalone="no"?>

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook-Interchange XML V4.2//EN"
	"../docbook/docbookxi.dtd">

<article id='xmldocs'>

<sect1>
	<title>Test title</title>

  <para> <!-- COMMENT: Beginning of a paragraph -->
  
  It is <emphasis>very</emphasis> important to read this line.
  Some lines are <emphasis role='bold'>boldly bolder</emphasis> than others.
  The <database>products</database> database contains products.
  </para>
</sect1>

</article>

As you can see, XML can look structured and all, but there's so much overhead involved in writing XML documentation. For example, I wouldn't know offhand how to define DOCTYPE properly — I just took the effort of learning it once, and I kept copy/pasting it ever since.

XMLDOCS aims to be as overhead-free and efficient as possible to write. This, however, leads us to mention four main differences between DocBook XML and XMLDOCS:

DocBook! Interchange!