Class SafeXmlDocument
- java.lang.Object
-
- javax.xml.parsers.DocumentBuilder
-
- microsoft.exchange.webservices.data.security.SafeXmlDocument
-
public class SafeXmlDocument extends DocumentBuilder
XmlDocument that does not allow DTD parsing.
-
-
Constructor Summary
Constructors Constructor Description SafeXmlDocument()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DOMImplementationgetDOMImplementation()booleanisNamespaceAware()booleanisValidating()voidload(InputStream inStream)Loads the XML document from the specified stream.voidload(Reader txtReader)Loads the XML document from the specified TextReader.voidload(String filename)Loads the XML document from the specified URL.voidload(XMLStreamReader reader)Loads the XML document from the specified XMLReader.voidloadXml(String xml)Loads the XML document from the specified string.DocumentnewDocument()Documentparse(InputSource is)voidsetEntityResolver(EntityResolver er)voidsetErrorHandler(ErrorHandler eh)-
Methods inherited from class javax.xml.parsers.DocumentBuilder
getSchema, isXIncludeAware, parse, parse, parse, parse, reset
-
-
-
-
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:
IOExceptionSAXException
-
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:
getDOMImplementationin classDocumentBuilder
-
isNamespaceAware
public boolean isNamespaceAware()
- Specified by:
isNamespaceAwarein classDocumentBuilder
-
isValidating
public boolean isValidating()
- Specified by:
isValidatingin classDocumentBuilder
-
newDocument
public Document newDocument()
- Specified by:
newDocumentin classDocumentBuilder
-
parse
public Document parse(InputSource is) throws SAXException, IOException
- Specified by:
parsein classDocumentBuilder- Throws:
SAXExceptionIOException
-
setEntityResolver
public void setEntityResolver(EntityResolver er)
- Specified by:
setEntityResolverin classDocumentBuilder
-
setErrorHandler
public void setErrorHandler(ErrorHandler eh)
- Specified by:
setErrorHandlerin classDocumentBuilder
-
-