XMLValidate

Description

This task checks xml files are valid (or only well formed). The task uses crimson SAX2 parser implementation by default, but one can specify any SAX1/2 parser if needed

Parameters

Attribute Description Required
file the file(s) you want to check. (optionally can use an embedded fileset) No
lenient if true, only check the xml document is well formed (ignored if the specified parser is as SAX1 parser) No
classname the parser to use. (default: crimson). No
classpathref where to find the parser class. Optionally can use an embedded classpath element. No
failonerror fails on a error if set to true (defaults to true). No
warn log parser warn events. No

Examples

<xmlvalidate file="toto.xml"/>

    <xmlvalidate failonerror="no" lenient="yes" warn="yes"
	         classname="org.apache.xerces.parsers.SAXParser" >
	         classpath="lib/xerces.jar">
        <fileset dir="src" includes="style/*.xsl"/>  
    </xmlvalidate>

Copyright © 2000,2001 Apache Software Foundation. All rights Reserved.