org.deegree.tools.xml
Class SimpleValidator
java.lang.Object
  
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:$
 
 
 
 
| 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(URL config)
                throws IOException
- Initializes from configuration URL. File should be encoded in UTF-8.
- Parameters:
 config - 
- Throws:
 IOException
 
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 - 
 
                an open source project founded by lat/lon, Bonn, Germany.
                    For more information visit: http://www.deegree.org