4 - Using the mxmldoc Utility

This chapter describes how to use the mxmldoc(1) utility that comes with Mini-XML to automatically generate documentation for your programs.

The Basics

The mxmldoc utility scans C and C++ source and header files and produces an XML file describing the library interface and an XHTML file providing a human-readable reference to the code.

XML Schema

The following poor-man's schema describes the format of the XML files produced by mxmldoc:

    <?xml version="1.0"?>
    <namespace name="">                        [optional...]
      <constant name="">
	<description>descriptive text</description>
      </constant>

      <enumeration name="">
	<constant name="">...</constant>
      </enumeration>

      <typedef name="">
	<description>descriptive text</description>
	<type>type string</type>
      </typedef>

      <function name="" scope="">
	<description>descriptive text</description>
	<argument name="" direction="I|O|IO" default="">
          <description>descriptive text</description>
          <type>type string</type>
	</argument>
	<returnvalue>
          <description>descriptive text</description>
          <type>type string</type>
	</returnvalue>
	<seealso>function names separated by spaces</seealso>
      </function>

      <variable name="" scope="">
	<description>descriptive text</description>
	<type>type string</type>
      </variable>

      <struct name="">
	<description>descriptive text</description>
	<variable name="">...</variable>
	<function name="">...</function>
      </struct>

      <union name="">
	<description>descriptive text</description>
	<variable name="">...</variable>
      </union>

      <class name="" parent="">
	<description>descriptive text</description>
	<class name="">...</class>
	<enumeration name="">...</enumeration>
	<function name="">...</function>
	<struct name="">...</struct>
	<variable name="">...</variable>
      </class>
    </namespace>