Shackelford, John-Mason wrote:
Craeg,


It would be great if there could be some new Ant resource of some kind -- perhaps a new datatype -- that represented a chunk of parsed XML.


Hmmm. I am reading up on the xmlproperty task which is a start but isn't
quite robust enough for our purposes.

Look at the code in proposal/embed

IT has a XMLDOM datatype that keeps the xml DOM in memory as a reference in the Ant project, and can thus be used also by sub calls to Ant is you inherit the references.

To get or set values in the DOM, you simply use xpath.

To get (example):

${jxpath:/references/mydomid/root/rootnode/mynode[theattribute='myvalue']/nameagain/@etc}

For extra examples run the test.xml file.

Search also bugzilla for [PATCH]es for it not yet committed.

--
Nicola Ken Barozzi                   [EMAIL PROTECTED]
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------


-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to