The Markup user's guide

Gerd Stolpmann

Markup is a validating parser for XML-1.0 which has been written entirely and from scratch in Objective Caml.

Download Markup:

The free Markup library can be downloaded at http://ocaml-programming.de/markup. The user's guide is included. Newest releases of Markup will be announced in The OCaml Link Database and in the mailing list structio-anuncio@lists.sourceforge.net.

License

This document, and the described software, "Markup", are copyright by Gerd Stolpmann.

Permission is hereby granted, free of charge, to any person obtaining a copy of this document and the "Markup" software (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

The Software is provided ``as is'', without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall Gerd Stolpmann be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the Software or the use or other dealings in the software.


Table of Contents
I. User's guide
1. What is XML?
1.1. Introduction
1.2. Highlights of XML
1.3. A complete example: The readme DTD
2. Using Markup
2.1. Validation
2.2. How to parse a document from an application
2.3. Class-based processing of the node tree
2.4. Example: An HTML backend for the readme DTD
3. The objects representing the document
3.1. The document class
3.2. The class type node
3.3. The class type extension
3.4. Details of the mapping from XML text to the tree representation
4. Configuring and calling the parser
4.1. Overview
4.2. Resolvers and sources
4.3. The DTD classes
4.4. Invoking the parser
4.5. Updates
List of Figures
3-1. A tree with element nodes, data nodes, and attributes
3-2. Nodes are doubly linked trees
3-3. A node can only be added if it is a root
3-4. A deleted node becomes the root of the subtree
3-5. The clone of a subtree
extension-general. The structure of nodes and extensions