org.deegree.tools.xml
Class SimpleValidator
java.lang.Object
org.deegree.tools.xml.SimpleValidator
public class SimpleValidator
- extends java.lang.Object
SimpleValidator
is a simple xpath based "validator". It can be used to crudely
check XML documents for existing nodes. A sample rule file can be found right beneath in this
package.
- Version:
- $Revision:$, $Date:$
- Author:
- Andreas Schmitz, last edited by: $Author:$
Constructor Summary |
SimpleValidator(java.net.URL config)
Initializes from configuration URL. |
Method Summary |
static void |
main(java.lang.String[] args)
|
java.util.LinkedList<StringPair> |
validate(org.w3c.dom.Node n)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
nsContext
static final NamespaceContext nsContext
SimpleValidator
public SimpleValidator(java.net.URL config)
throws java.io.IOException
- Initializes from configuration URL. File should be encoded in UTF-8.
- Parameters:
config
-
- Throws:
java.io.IOException
validate
public java.util.LinkedList<StringPair> validate(org.w3c.dom.Node n)
- Parameters:
n
-
- Returns:
- a list of errors. A pair will include the id of the failed rule, and the context node
as string (if applicable) or null (if not).
main
public static void main(java.lang.String[] args)
- Parameters:
args
-
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org