BUILD FAILED test.xml:7:根元素后面的文档中的标记必须格式正确

时间:2013-08-26 09:48:05

标签: xml eclipse

我不知道这里有什么问题    我关闭了所有标签 它吓坏了我

如果我有神蝙蝠路径,如果我有这个文件pat或一个空文件路径,我是java的初学者,而且我正在做这本书,书很老,而且不好解释< / p>
 <?xml version="1.0" encoding="UTF-8"?>
<project>
<project name="Run Test" default="run_test" basedir=".">
<property name="test.dir" value="src\test" />
<property name="testLibDir" value="lib" />
</project>

    <target name="start-server">
        <java jar="lib/selenium-server.jar"
            fork="true" spawn="true">
        </java>
    </target>
<target name="stop-server">
    <get taskname="selenium-shutdown"
        src="http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer"
        dest="result.txt" ignoreerrors="true" />
            <echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected"/>
</target>

<target name="run_test" description="Start Proxy ; Run Test ; stop Proxy">
    <parallel>
        <antcall target="start-server">
        </antcall>
            <sequential>
                <echo taskname="waitfor" message="Wait for proxy server launch" />
                <waitfor maxwait="2" maxwaitunit="minute" checkevery="100">
                    <http url="http://localhost:4444/seleniumserver/driver/?cmd=testComplete"/>
                </waitfor>
                    <antcall target="run_test">
                    </antcall>
                <antcall target="stop-server">
                </antcall>
            </sequential>
    </parallel>
</target>
<schedule>
    <ant antscript="D:\Automation\eclipse\Workspace2\testing.bat"
            antworkingdir="D:\Automation\eclipse\Workspace2\Test2"
            buildfile="build.xml"
            uselogger="true"
            usedebug="false"/>
</schedule>
   </project>

编辑

2 个答案:

答案 0 :(得分:1)

很简单:你没有root element。每个XML文件都需要root element,否则标记无效!

答案 1 :(得分:0)

</project>结束标记应放在文档的末尾。