AutoGen: 8.6 Invoking xml2ag

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

## 8.6 Invoking xml2ag

This program will convert any arbitrary XML file into equivalent AutoGen definitions, and invoke AutoGen. The template used will be derived from either:

- The -override-tpl command line option
- A top level XML attribute named, "`template`"

One or the other must be provided, or the program will exit with a failure message.

The base-name for the output will similarly be either:

- The -base-name command line option.
- The base name of the ``.xml'` file.

The definitions derived from XML generally have an extra layer of definition. Specifically, this XML input:

    <mumble attr="foo">
      mumble-1
      <grumble>
      grumble, grumble, grumble.
    </grumble>mumble, mumble
    </mumble>

Will get converted into this:

    mumble = {
      grumble = {
        text = 'grumble, grumble, grumble';
      };
      text = 'mumble-1';
      text = 'mumble, mumble';
    };

Please notice that some information is lost. AutoGen cannot tell that "grumble" used to lie between the mumble texts. Also please note that you cannot assign:

    grumble = 'grumble, grumble, grumble.';

because if another "grumble" has an attribute or multiple texts, it becomes impossible to have the definitions be the same type (compound or text values).

This section was generated by AutoGen, the aginfo template and the option descriptions for the `xml2ag` program. It documents the xml2ag usage text and option meanings.

This software is released under the GNU General Public License.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated by Bruce Korb on January, 8 2006 using texi2html 1.76.