microsoft.exchange.webservices.data.security
Class SafeXmlDocument

java.lang.Object
  extended by javax.xml.parsers.DocumentBuilder
      extended by microsoft.exchange.webservices.data.security.SafeXmlDocument

public class SafeXmlDocument
extends DocumentBuilder

XmlDocument that does not allow DTD parsing.


Constructor Summary
SafeXmlDocument()
           
 
Method Summary
 DOMImplementation getDOMImplementation()
           
 boolean isNamespaceAware()
           
 boolean isValidating()
           
 void load(InputStream inStream)
          Loads the XML document from the specified stream.
 void load(Reader txtReader)
          Loads the XML document from the specified TextReader.
 void load(String filename)
          Loads the XML document from the specified URL.
 void load(XMLStreamReader reader)
          Loads the XML document from the specified XMLReader.
 void loadXml(String xml)
          Loads the XML document from the specified string.
 Document newDocument()
           
 Document parse(InputSource is)
           
 void setEntityResolver(EntityResolver er)
           
 void setErrorHandler(ErrorHandler eh)
           
 
Methods inherited from class javax.xml.parsers.DocumentBuilder
getSchema, isXIncludeAware, parse, parse, parse, parse, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SafeXmlDocument

public SafeXmlDocument()
Method Detail

load

public void load(InputStream inStream)
          throws XMLStreamException
Loads the XML document from the specified stream.

Parameters:
inStream - The stream containing the XML document to load.
Throws:
XMLStreamException

load

public void load(String filename)
Loads the XML document from the specified URL.

Parameters:
filename - URL for the file containing the XML document to load. The URL can be either a local file or an HTTP URL (a Web address).

load

public void load(Reader txtReader)
Loads the XML document from the specified TextReader.

Parameters:
txtReader - The TextReader used to feed the XML data into the document.

load

public void load(XMLStreamReader reader)
          throws SAXException,
                 IOException
Loads the XML document from the specified XMLReader.

Parameters:
reader - The XMLReader used to feed the XML data into the document.
Throws:
IOException
SAXException

loadXml

public void loadXml(String xml)
Loads the XML document from the specified string.

Parameters:
xml - String containing the XML document to load.

getDOMImplementation

public DOMImplementation getDOMImplementation()
Specified by:
getDOMImplementation in class DocumentBuilder

isNamespaceAware

public boolean isNamespaceAware()
Specified by:
isNamespaceAware in class DocumentBuilder

isValidating

public boolean isValidating()
Specified by:
isValidating in class DocumentBuilder

newDocument

public Document newDocument()
Specified by:
newDocument in class DocumentBuilder

parse

public Document parse(InputSource is)
               throws SAXException,
                      IOException
Specified by:
parse in class DocumentBuilder
Throws:
SAXException
IOException

setEntityResolver

public void setEntityResolver(EntityResolver er)
Specified by:
setEntityResolver in class DocumentBuilder

setErrorHandler

public void setErrorHandler(ErrorHandler eh)
Specified by:
setErrorHandler in class DocumentBuilder


Copyright © 2012–2015 Microsoft. All rights reserved.