You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stephen McConnell <mc...@apache.org> on 2004/08/18 22:29:35 UTC

handling an arbitrary elements in a custom task

I have a custom task within which I want to arbitrary XML and I want to
find out how I can enable this.  I've been digging around in ant docs
but without a lot of success.

In effect what I want to do is something like:

<x:block name="demo">
  <x:component name="widget" class="org.gizmo.DefaultWidget">
    <x:configuration>
      <!--
      In here I want users to be able to declare arbitrary elements.
      In effect, what I need is a mechanism to intercept ant's 
      nested element handling. 
      -->
    </xconfiguration>
  </x:component>
</x:block>

As in:

  <x:component name="widget" class="org.gizmo.DefaultWidget">
    <x:configuration>
      <x:whatever speed="faster"/> <!-- arbitrary user element -->
    </xconfiguration>
  </x:component>

Within my block task I need to get access to something like a DOM
Element and handle nested elements and attributes myself.  

Is this possible?

Cheers, Steve.




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: handling an arbitrary elements in a custom task

Posted by Stephen McConnell <mc...@apache.org>.

> -----Original Message-----
> From: Matt Benson [mailto:gudnabrsam@yahoo.com]
> Sent: 19 August 2004 15:54
> To: Ant Users List
> Subject: Re: handling an arbitrary elements in a custom task
> 
> Steve:  have a look at the oata.Dynamic* interfaces as
> well as oata.util.XMLFragment.  They are intended to
> serve this type of need.

Thanks Matt - I'm happy to report that the Dynamic* stuff worked just
fine.

Cheers, Steve.




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: handling an arbitrary elements in a custom task

Posted by Matt Benson <gu...@yahoo.com>.
Steve:  have a look at the oata.Dynamic* interfaces as
well as oata.util.XMLFragment.  They are intended to
serve this type of need.

-Matt

--- Stephen McConnell <mc...@apache.org> wrote:

> 
> I have a custom task within which I want to
> arbitrary XML and I want to
> find out how I can enable this.  I've been digging
> around in ant docs
> but without a lot of success.
> 
> In effect what I want to do is something like:
> 
> <x:block name="demo">
>   <x:component name="widget"
> class="org.gizmo.DefaultWidget">
>     <x:configuration>
>       <!--
>       In here I want users to be able to declare
> arbitrary elements.
>       In effect, what I need is a mechanism to
> intercept ant's 
>       nested element handling. 
>       -->
>     </xconfiguration>
>   </x:component>
> </x:block>
> 
> As in:
> 
>   <x:component name="widget"
> class="org.gizmo.DefaultWidget">
>     <x:configuration>
>       <x:whatever speed="faster"/> <!-- arbitrary
> user element -->
>     </xconfiguration>
>   </x:component>
> 
> Within my block task I need to get access to
> something like a DOM
> Element and handle nested elements and attributes
> myself.  
> 
> Is this possible?
> 
> Cheers, Steve.
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org