autogen_back

Process AutoGen templates with XML data

Main
AutoGen
Pages

Home
Announce
FAQ
docs
XML Defs
testimonials
downloads

Automated
Options

AutoOpts
Comparison
Man example
Redistribute
Licensing
local use
using getopt

GCC's
Fixincludes

fixincludes

Automated
FSM

description
example
usagefsm

Addons
addon

Autoconf
Config
Tests

create form
M4 Quoting

Automated
XDR

xdr project

i

AutoGen handles definitions in XML form by converting XML format to AutoGen Definition format. There is a small amount of information loss, as follows:

White space is stripped.
Leading and trailing white space is stripped. If there is nothing but white space, no text entry is made.

DTD's are not required
Whatever is present in the XML text will show up in the definitions.

template selection
If the top level entity has an attribute named ``template'', then you can omit the ``-T <template-name>'' option to xml2ag.

attributes
Attributes are assigned plain text values

entities
Entities always have structured values.

ordering
Ordering between differently named siblings is lost. All siblings of the same name (e.g. the two "grumbles") have ordered preserved. However, there is no ordering between the grumbles and texts within the mumbling below.

Here is a simple example of XML text:
   
<?xml version="1.0"?>
<ag_example template="sample.tpl">
  <mumble attr="foo">
    <grumble>
      &lt;stumble around the 'XML'.&gt;
    </grumble>
    mumble-1
    <!-- This is just a
         /* multi-line comment */ -->
    mumble-2
    <grumble>
      grumble &amp; "grumble" &amp; grumble.
    </grumble>
    mumble, mumble
  </mumble>
  <stumble upon="rough going"/>
</ag_example>
and the resulting output, derived by filtering the above text through: ``xml2ag -O-''
 
/* Parsed from stdin */
AutoGen Definitions sample.tpl;
XML-version = '1.0';
XML-standalone = true;
template = 'sample.tpl';
mumble = {
  content = '';
  attr = 'foo';
  grumble = {
    content = '';
    text = '<stumble around the \'XML\'.>';
  };
  text = 'mumble-1';
  /* This is just a
         /* multi-line comment * / */
  text = 'mumble-2';
  grumble = {
    content = '';
    text = 'grumble & "grumble" & grumble.';
  };
  text = 'mumble, mumble';
};
stumble = {
  content = '';
  upon = 'rough going';
};

Please direct any questions, comments, suggestions or anything else to the author, .


top  Viewable With Any Browser  SourceForge Logo   Support This Project   Valid XHTML 1.0!


AutoGen, AutoOpts, columns, getdefs, AutoFSM, AutoXDR and these web pages copyright (c) 1999-2012 Bruce Korb, all rights reserved.
Last modified: Sat Aug 30 10:58:55 PDT 2014