You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

xmlvalidate.html 2.1 KiB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <html>
  2. <head>
  3. <title>XMLValidate Task</title>
  4. </head>
  5. <body>
  6. <h2><a name="xmlvalidate">XMLValidate</a></h2>
  7. <h3>Description</h3>
  8. <p>
  9. 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
  10. </p>
  11. <h3>Parameters</h3>
  12. <table border="1" cellpadding="2" cellspacing="0">
  13. <tr>
  14. <td valign="top"><b>Attribute</b></td>
  15. <td valign="top"><b>Description</b></td>
  16. <td align="center" valign="top"><b>Required</b></td>
  17. </tr>
  18. <tr>
  19. <td valign="top">file</td>
  20. <td valign="top">the file(s) you want to check. (optionally can use an embedded fileset)</td>
  21. <td valign="top" align="center">No</td>
  22. </tr>
  23. <tr>
  24. <td valign="top">lenient</td>
  25. <td valign="top">
  26. if true, only check the xml document is well formed
  27. (ignored if the specified parser is as SAX1 parser)
  28. </td>
  29. <td valign="top" align="center">No</td>
  30. </tr>
  31. <tr>
  32. <td valign="top">classname</td>
  33. <td valign="top">the parser to use. (default: crimson).</td>
  34. <td align="center" valign="top">No</td>
  35. </tr>
  36. <tr>
  37. <td valign="top">classpathref</td>
  38. <td valign="top">where to find the parser class. Optionally can use an embedded classpath element.</td>
  39. <td align="center" valign="top">No</td>
  40. </tr>
  41. <tr>
  42. <td valign="top">failonerror</td>
  43. <td valign="top">fails on a error if set to true (defaults to true).</td>
  44. <td align="center" valign="top">No</td>
  45. </tr>
  46. <tr>
  47. <td valign="top">warn</td>
  48. <td valign="top">log parser warn events.</td>
  49. <td align="center" valign="top">No</td>
  50. </tr>
  51. </table>
  52. <h3>Examples</h3>
  53. <blockquote><pre>
  54. &lt;xmlvalidate file="toto.xml"/&gt;
  55. &lt;xmlvalidate failonerror="no" lenient="yes" warn="yes"
  56. classname="org.apache.xerces.parsers.SAXParser" &gt;
  57. classpath="lib/xerces.jar"&gt;
  58. &lt;fileset dir="src" includes="style/*.xsl"/&gt;
  59. &lt;/xmlvalidate&gt;
  60. </pre></blockquote>
  61. <hr>
  62. <p align="center">Copyright &copy; 2000,2001 Apache Software Foundation. All rights
  63. Reserved.</p>
  64. </body>
  65. </html>