Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.xml.schemavalidator
Class XSDValidator

    java.lang.Object
      |
      +--oracle.xml.schemavalidator.XSDValidator

public class XSDValidator
extends java.lang.Object

This class encapsulates the oracle.xml.parser.schema.XSDValidator class and adds functionalities for validating a DOM tree. The schema document is a constant and the validation is done for XMLDocuments that can be passed as InputStreams,URLs etc. The validation is done only after the DOM tree is built in all the cases. Nodes with errors are returned in a vector of stack trees where the top element of the stack represents the root node and child nodes are obtained by popping the elemnts of the stack.

Constructor Summary
`XSDValidator()` Constructor for oracle.xml.XSDValidator.

Method Summary
`XMLError` | `getError()` gets the XMLError object for this object.
`java.util.Vector` | `getStackList()` Gets the List of Tree Paths in the XMLDocument which leads to the node that encountered a validation error.
`void` | `setError(XMLError err)` Sets the XMLError object for this object.
`void` | `setSchema(XMLSchema xmlsch)` Sets the XMLSchema object for this object.
`void` | `validate(java.io.InputStream is)` Validates the InputStream containing the XML instance document against the XMLSchema object.
`void` | `validate(java.net.URL url)` Validates the URL containing the XML instance document against the XMLSchema object.
`void` | `validate(XMLDocument xmldoc)` Validates an XMLDocument against the XMLSchema object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XSDValidator

    public XSDValidator()
                 throws XSDException

  Constructor for oracle.xml.XSDValidator. This also constructs the oracle.xml.parser.schema.XSDValidator, XMLSchema & XMLError objects.

Method Detail

### validate

    public void validate(XMLDocument xmldoc)
                  throws XSDException,
    SAXException,
                         java.io.IOException

  Validates an XMLDocument against the XMLSchema object. The XMLError is set for returning the DOM errors nodes.
  Parameters:
    `xmldoc` - -- Parsed XMLDocument
    `XSDException`
    `SAXException`
    `java.io.IOException`

### validate

    public void validate(java.io.InputStream is)
                  throws XSDException,
    SAXException,
                         java.io.IOException

  Validates the InputStream containing the XML instance document against the XMLSchema object. The XMLError is set for returning the DOM errors nodes.
    `XSDException`
    `SAXException`
    `java.io.IOException`

### validate

    public void validate(java.net.URL url)
                  throws XSDException,
    SAXException,
                         java.io.IOException

  Validates the URL containing the XML instance document against the XMLSchema object. The XMLError is set for returning the DOM errors nodes.
    `XSDException`
    `SAXException`
    `java.io.IOException`

### setSchema

    public void setSchema(XMLSchema xmlsch)

  Sets the XMLSchema object for this object. The validation is done against this schema object.
  Parameters:
    `xmlsch` - -- XMLSchema object

### setError

    public void setError(XMLError err)

  Sets the XMLError object for this object.
  Parameters:
    `err` - -- XMLError object

### getError

    public XMLError getError()

  gets the XMLError object for this object.
  Returns:
    err -- XMLError object

### getStackList

    public java.util.Vector getStackList()

  Gets the List of Tree Paths in the XMLDocument which leads to the node that encountered a validation error.
  Returns:
    - java.util.Vector

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Application Server XML Java API Reference 10g Release 2 (10.1.2) Part no. B12024-03 September 2004
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003, 2004, Oracle. All rights reserved.