antology 2.0.7


Parses an XML document into ANT properties. Resembles ANT's standard <xmlproperty> task, but maps the XML DOM in a different, more detailed way.

This task is the inversion of the <propertyXml2> task.

Sets the following properties for the root element of the XML document:

prefix0.root-element-name.$$         = all-texts
prefix0.root-element-name._att1-name = att1-value
prefix0.root-element-name._att2-name = att2-value
prefix0.root-element-name.index.$    = text
prefix0.root-element-name.index.#    = comment
prefix0.root-element-name.index.!    = cdata-text
prefix0.root-element-name.index.?    = processing-instruction-target-and-data

Sets the following properties for all other elements in the XML document:

...parent-element-name.index.subelement-name.$$         = all-texts
...parent-element-name.index.subelement-name._att1-name = att1-value
...parent-element-name.index.subelement-name._att2-name = att2-value
...parent-element-name.index.subelement-name.index.$    = text
...parent-element-name.index.subelement-name.index.#    = comment
...parent-element-name.index.subelement-name.index.!    = cdata-text
...parent-element-name.index.subelement-name.index.?    = processing-instruction-target-and-data

This document

  <?xml version='1.0' encoding='UTF-8'?>
  <project name="prj1">
      <target name="trg1">
          <echo message="msg" />

sets the following properties:

  prefix.0.project.$$                       =
  prefix.0.project._name                    = prj1
  prefix.0.project.0.$                      = \n\t$$              =           = trg1$             = \n\t\t$$       = = msg$             = \n\t
  prefix.0.project.2.$                      = \n
antology 2.0.7

Copyright © 2019. All rights reserved.