You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mark Claassen <ma...@donnell.com> on 2001/11/14 14:39:09 UTC

Sub-element question

I am trying to write a custom task and I need to have a subelement in it
like the following example.

<target name = "Task">
	<SubSection>
		<element1/>
		<element2/>
		...
	</SubSection>
</target>

This may be more of a dev question, but I was wondering if someone here
could point me to a good example of how to use this.

Thanks for your time,
Mark


---------------------
Mark Claassen
Donnell Systems, Inc.
300 S. St. Louis Blvd. Ste. 203
South Bend, IN 46617
E-mail: mailto:mark.claassen@donnell.com
Voice: (219)232-3784
Fax: (219)232-4014



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Sub-element question

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 14 Nov 2001, Mark Claassen <ma...@donnell.com> wrote:

> I am trying to write a custom task and I need to have a subelement
> in it

See <http://jakarta.apache.org/ant/manual/develop.html> list element 5
in the first section.

> like the following example.
>
> <target name = "Task">
> 	<SubSection>
> 		<element1/>
> 		<element2/>
> 		...
> 	</SubSection>
> </target>

The class corrsponding to SubSection needs methods like

public Foo createElement1()

or

public void addElement2(Bar aBar)

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Sub-element question

Posted by Mark Claassen <ma...@donnell.com>.
Thanks for everyone's help on this.  I really appreciate the feedback!

Mark

> -----Original Message-----
> From: Peter Donald [mailto:donaldp@apache.org]
> Sent: Wednesday, November 14, 2001 6:44 PM
> To: Ant Users List
> Subject: Re: Sub-element question
> 
> 
> On Thu, 15 Nov 2001 00:39, Mark Claassen wrote:
> > I am trying to write a custom task and I need to have a subelement in it
> > like the following example.
> >
> > <target name = "Task">
> > 	<SubSection>
> > 		<element1/>
> > 		<element2/>
> > 		...
> > 	</SubSection>
> > </target>
> >
> > This may be more of a dev question, but I was wondering if someone here
> > could point me to a good example of how to use this.
> 
> Theres a developers guid in ant manual.
> 
> Basically it amounts to creating methods of the form
> 
> public void addElement1( MyObjectType element1 );
> 
> or
> 
> public MyObjectType createElement1( );
> 
> >
> > Thanks for your time,
> > Mark
> >
> >
> > ---------------------
> > Mark Claassen
> > Donnell Systems, Inc.
> > 300 S. St. Louis Blvd. Ste. 203
> > South Bend, IN 46617
> > E-mail: mailto:mark.claassen@donnell.com
> > Voice: (219)232-3784
> > Fax: (219)232-4014
> 
> -- 
> Cheers,
> 
> Pete
> 
> --------------------------------------------------------------
> "Science is like sex: sometimes something useful comes out, 
> but that is not the reason we are doing it" -- Richard Feynman
> --------------------------------------------------------------
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Sub-element question

Posted by Peter Donald <do...@apache.org>.
On Thu, 15 Nov 2001 00:39, Mark Claassen wrote:
> I am trying to write a custom task and I need to have a subelement in it
> like the following example.
>
> <target name = "Task">
> 	<SubSection>
> 		<element1/>
> 		<element2/>
> 		...
> 	</SubSection>
> </target>
>
> This may be more of a dev question, but I was wondering if someone here
> could point me to a good example of how to use this.

Theres a developers guid in ant manual.

Basically it amounts to creating methods of the form

public void addElement1( MyObjectType element1 );

or

public MyObjectType createElement1( );

>
> Thanks for your time,
> Mark
>
>
> ---------------------
> Mark Claassen
> Donnell Systems, Inc.
> 300 S. St. Louis Blvd. Ste. 203
> South Bend, IN 46617
> E-mail: mailto:mark.claassen@donnell.com
> Voice: (219)232-3784
> Fax: (219)232-4014

-- 
Cheers,

Pete

--------------------------------------------------------------
"Science is like sex: sometimes something useful comes out, 
but that is not the reason we are doing it" -- Richard Feynman
--------------------------------------------------------------


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>