ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ma'moun Abu Hellu <mamounb...@yahoo.com>
Subject Re: what this mean : xml document structures must start and end within the same entity
Date Mon, 17 Mar 2008 09:44:40 GMT
hi,
  actually I'm using Apache-ant 1.7.0  under Windows vista and i simply want to run the tutorial
example  Writing Tasks  which is 
  .................
   
  public class HelloWorld {
    public void execute() {
        System.out.println("Hello World");
    }
}
  -----------
   
  <?xml version="1.0" encoding="ISO-8859-1"?>
  <project name="MyTask" basedir="." default="use"> 
  <project name="MyTask" basedir="." default="jar">
  <property name="src.dir" value="src"/>
  <property name="classes.dir" value="classes"/>
  <target name="clean" description="Delete all generated files">
  <delete dir="${classes.dir}" failonerror="false"/>
  <delete file="${ant.project.name}.jar"/>
  </target>
  <target name="compile" description="Compiles the Task">
  <mkdir dir="${classes.dir}"/>
  <javac srcdir="${src.dir}" destdir="${classes.dir}"/> 
  </target>
  <target name="jar" description="JARs the Task" depends="compile">
  <jar destfile="${ant.project.name}.jar" basedir="${classes.dir}"/>
  </target>
   
  <target name="use" description="Use the Task" depends="jar">
  <taskdef name="helloworld" classname="HelloWorld" classpath="${ant.project.name}.jar"/>
  <helloworld/>
  </target> 
   
  </project> 
  .................

  and i got the error :  xml document structures must start and end within the same entity
   
  i tried to change the tages but i cant solve it , so did the above build.xml correct 
  i can see their is  two < project .....> but when i delete the second one i cant compile
it 
   
  thanks in advance 
David Brown <david@davidwbrown.name> wrote:
  Hello, running Ant means ant parses and executes a so-called build.xml. XML documents in
general must be what is termed as: well-formed. This means that all XML documents have a singleton
parent entity element. This means that if a generic XML document had a parent entity element
structured as:



then to keep faith with the well-formed document rule the corresponding end element would
have to come at the end of the target XML document:



The following links are much more authoritative and comprehensive than the above squibble:

http://www.spoono.com/xml/tutorials/tutorial.php?id=2

http://www.w3.org/XML/

http://ant.apache.org/manual/index.html

Ultimately, you have something amiss with your build.xml that Ant is trying to parse. To get
help from one of the Ant gurus you will have to create a much more meaningful message with
more information:

OS: Debian or Windows or something
Ant version: 1.5.x or 1.7 or something
Ant environment such as: ant -debug output captured from the console.
Default Ant target being execute from build.xml.


HTH.

Ma'moun Abu Hellu wrote ..
> Hi all ,
> I'm still fresh with Ant i tried to run the example in the Writing Tasks Tutorials
> but when i try to USE it i get 
> 
> xml document structures must start and end within the same entity
> 
> please could any one help me.
> 
> Regards
> 
> 
> Eng.Ma'moun Abu Helou . 
> Computer Engineer .
> 
> Jerusalem,Palestine.(+972-02-2353912). 
> Milano,Italy (+39 02 21085 613 2)
> (+39 3394070256 )
> 
> 
> ---------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

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




Eng.Ma'moun Abu Helou . 
Computer Engineer .

  Jerusalem,Palestine.(+972-02-2353912). 
Milano,Italy (+39 02 21085 613 2)
                  (+39 3394070256 )

       
---------------------------------
Looking for last minute shopping deals?  Find them fast with Yahoo! Search.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message