deegree 2.3 (2010/04/09 10:10 build-4-official)

org.deegree.tools.xml
Class SimpleValidator

java.lang.Object
  extended by org.deegree.tools.xml.SimpleValidator

public class SimpleValidator
extends 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:$

Field Summary
(package private) static NamespaceContext nsContext
           
 
Constructor Summary
SimpleValidator(URL config)
          Initializes from configuration URL.
 
Method Summary
static void main(String[] args)
           
 LinkedList<StringPair> validate(Node n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nsContext

static final NamespaceContext nsContext
Constructor Detail

SimpleValidator

public SimpleValidator(URL config)
                throws IOException
Initializes from configuration URL. File should be encoded in UTF-8.

Parameters:
config -
Throws:
IOException
Method Detail

validate

public LinkedList<StringPair> validate(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(String[] args)
Parameters:
args -

deegree 2.3 (2010/04/09 10:10 build-4-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org