ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: xmltask xpath bug ?!, buffer to property ?!
Date Tue, 10 Jul 2007 13:29:39 GMT
Hi, Brian 

-----Original Message-----
From: Brian Agnew [] 
Sent: Tuesday, July 10, 2007 3:02 PM
To: Ant Users List
Subject: Re: xmltask xpath bug ?!, buffer to property ?!

(note: there's an XMLTask mailing list
which is more suitable for XMLTask-specific messages, but...)

normally i have no problems with xmltask ;-) but thanks for the pointer

I will have to check on property appends vs. buffer appends and what's
expected to work.

i expect the whole nodelist in the property when there is more than 1
would be nice to have all matches (nodelist) as separated list, and
the separator may be set as attribute ( default ' , ' )

Buffers are a better thing to copy/paste into (for many reasons I won't
into here). You can copy from a buffer to a property. Probably by doing
something like (warning - this is untested!)

<xmltask sourcebuffer="your buffer name">
   <copy path="/" property="your property name">

i tried that, but that gave me =
  [xmltask] Cannot use multiple buffer nodes as an input source
  [xmltask] at
  [xmltask] at

seems like a problem when there are more matches ?!

or similar. Perhaps you can forgo the additional <xmltask> invocation by
creating a dummy node in your real doc, pasting into that, copying into
property and then deleting the dummy node ?

i just need to pull out several parts of a xmlproperty file and dump it
to a txtfile
as input for a shellscript so it's no editing of a xmlpropertyfile

If nothing else works i'll go via <script> task with ruby, here i get
all nodes as
array, i.e. =

require "rexml/document"
include REXML 
names = XPath.match( doc, "//module/*/name")"Y:/demo.txt", "a") { |f|
names.each { |mname| f.print mname.text+"\r\n"}

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message