deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.tools.xml
Class SimpleValidator

java.lang.Object
  extended by 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:$

Field Summary
(package private) static NamespaceContext nsContext
           
 
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
 

Field Detail

nsContext

static final NamespaceContext nsContext
Constructor Detail

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
Method Detail

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 -

deegree 2.5 (2011/06/29 09:44 build-8-official)

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