ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <levylamb...@tiscali-dsl.de>
Subject Re: How to access a XML element from a given file ?
Date Tue, 29 Apr 2003 11:16:04 GMT
Could you then :
- have a look at the library dependencies
http://ant.apache.org/manual/install.html#librarydependencies
- which JDK are you using ?

in XmlProperty.java

import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;

All these imports are resolved by the standard JDK 1.4 distribution

If you are using say JDK 1.3 or 1.2 you need xml-apis.jar and
xercesImpl.jar, but I am not an expert.
These files should be installed under $ANT_HOME/lib/optional

Cheers
Antoine

----- Original Message -----
From: "Christophe Franco" <christophe.franco@oxand.com>
To: "Ant Users List" <user@ant.apache.org>
Sent: Tuesday, April 29, 2003 12:47 PM
Subject: Re: How to access a XML element from a given file ?


> Antoine Levy-Lambert wrote:
> > Maybe you are not really using ant 1.5.3 but another version. To see
what
> > your ant has in the guts, you can try the <antstructure/> task which
> > generated a DTD with all the tasks that are present in your current
version
> > of ant.
>
> I really think I'm using ant 1.5.3 :
> $ ant -version
> Apache Ant version 1.5.3 compiled on April 9 2003
>
> $ which ant
> \java\apache-ant-1.5.3\dist/bin/ant
>
>
> > Could you also show how your build file looks like ? is your
<xmlproperty/>
> > in a <project/> element or in a <target/> element ?
>
> The xmlproperty is in a <project/> element, like this :
>
> <?xml version="1.0" encoding="iso-8859-1" ?>
> <project name="demo-oxand-core" default="exe" basedir=".">
>
>    <!-- set global properties for this build -->
>    <property name="debug" value="on"/>
>    <property name="src" value="."/>
>
>
>    <!-- [more properties omitted] -->
>
> <!-- Here, definition of the configuration to use for this build,
> sourcedir is src-->
>    <property name="config-dir" value="../configurations/corrosion" />
>
>    <!-- Here, properties to use for dealing with the configuration,
> shall not be edited manually-->
>    <xmlproperty file="${config-dir}/definition.xml"/>
>
> <!-- here, the build file goes on with the targets -->
>
> </project>
>
> --
> Christophe Franco                       Oxand S.A.
> Ingénieur                               tel : 01 60 39 52 51
> DĂ©veloppement logiciel                  fax : 01 60 72 54 17
> christophe.franco@oxand.com             http://www.oxand.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>


Mime
View raw message