microsoft.exchange.webservices.data
Class SafeXmlSchema

java.lang.Object
  extended by javax.xml.validation.Schema
      extended by microsoft.exchange.webservices.data.SafeXmlSchema

public class SafeXmlSchema
extends javax.xml.validation.Schema

XmlSchema with protection against DTD parsing in read overloads


Constructor Summary
SafeXmlSchema()
           
 
Method Summary
 javax.xml.validation.Validator newValidator()
           
 javax.xml.validation.ValidatorHandler newValidatorHandler()
           
static javax.xml.validation.Schema Read(java.io.InputStream stream, javax.xml.bind.ValidationEventHandler validationEventHandler)
          Reads an XML Schema from the supplied stream.
static javax.xml.validation.Schema Read(javax.xml.stream.XMLStreamReader reader, javax.xml.bind.ValidationEventHandler validationEventHandler)
          Reads an XML Schema from the supplied TextReader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SafeXmlSchema

public SafeXmlSchema()
Method Detail

newValidator

public javax.xml.validation.Validator newValidator()
Specified by:
newValidator in class javax.xml.validation.Schema

newValidatorHandler

public javax.xml.validation.ValidatorHandler newValidatorHandler()
Specified by:
newValidatorHandler in class javax.xml.validation.Schema

Read

public static javax.xml.validation.Schema Read(java.io.InputStream stream,
                                               javax.xml.bind.ValidationEventHandler validationEventHandler)
                                        throws javax.xml.stream.XMLStreamException
Reads an XML Schema from the supplied stream.

Parameters:
stream - The supplied data stream.
validationEventHandler - The validation event handler that receives information about the XML Schema syntax errors
Returns:
The XmlSchema object representing the XML Schema.
Throws:
javax.xml.stream.XMLStreamException

Read

public static javax.xml.validation.Schema Read(javax.xml.stream.XMLStreamReader reader,
                                               javax.xml.bind.ValidationEventHandler validationEventHandler)
                                        throws javax.xml.stream.XMLStreamException
Reads an XML Schema from the supplied TextReader.

Parameters:
reader - The TextReader containing the XML Schema to read
validationEventHandler - The validation event handler that receives information about the XML Schema syntax errors.
Returns:
The XmlSchema object representing the XML Schema.
Throws:
javax.xml.stream.XMLStreamException