public interface XmlDocumentBuilder
DocumentBuilderFactory. Checked
exceptions will be wrapped into XmlRuntimeException.| Modifier and Type | Method and Description |
|---|---|
Document |
buildDocument()
Builds an empty document.
|
Document |
buildDocument(File file)
Builds document from file.
|
Document |
buildDocument(InputSource is)
Builds document from input source.
|
Document |
buildDocument(InputStream is)
Builds document from input stream.
|
Document |
buildDocument(InputStream is,
String systemId)
Builds document from input stream and system ID.
|
Document |
buildDocument(Object jaxbElement,
JAXBContext jaxbContext)
Builds document from an object (POJO that can be processed with
JAXBContext. |
Document |
buildDocument(Object jaxbElement,
Marshaller marshaller)
Builds document from an object (POJO) that can be processed with
Marshaller. |
Document |
buildDocument(String uri)
Builds document from uri.
|
DocumentBuilder |
buildDocumentBuilder()
Creates a new document builder.
|
static XmlDocumentBuilder |
builder()
Creates default builder instance.
|
XmlDocumentBuilder |
configureEntityResolver(EntityResolver entityResolver)
Sets the entity resolver to the created
DocumentBuilder. |
XmlDocumentBuilder |
configureErrorHandler(ErrorHandler errorHandler)
Sets error handler to the created
DocumentBuilder. |
XmlDocumentBuilder |
configureFactory(Boolean coalescing,
Boolean expandEntityReferences,
Boolean ignoringComments,
Boolean ignoringElementContentWhitespace,
Boolean namespaceAware,
Boolean validating,
Boolean xIncludeAware)
Configures the
DocumentBuilderFactory. |
XmlDocumentBuilder |
configureFactory(XmlDocumentBuilderFactoryConfigurator configurator)
Configures the
DocumentBuilderFactory. |
XmlDocumentBuilder |
configureFactoryAttribute(String name,
Object value)
Sets the given attribute to the underlying
DocumentBuilderFactory. |
XmlDocumentBuilder |
configureFactoryFeature(String name,
boolean value)
Sets the given feature to the underlying
DocumentBuilderFactory. |
XmlDocumentBuilder |
configureFactorySchema(Schema schema)
Sets the given schema to the underlying
DocumentBuilderFactory. |
XmlDocumentBuilder configureFactory(XmlDocumentBuilderFactoryConfigurator configurator)
DocumentBuilderFactory. The default xml document builder has the same
default values as the underlying factory except that DocumentBuilderFactory.setNamespaceAware(boolean)
is set to true.configurator - the configuratorXmlDocumentBuilder configureFactory(Boolean coalescing, Boolean expandEntityReferences, Boolean ignoringComments, Boolean ignoringElementContentWhitespace, Boolean namespaceAware, Boolean validating, Boolean xIncludeAware)
DocumentBuilderFactory. The default xml document builder has the same
default values as the underlying factory except that DocumentBuilderFactory.setNamespaceAware(boolean)
is set to true.
A value with null will be ignored and the default will be used.
The default values are:
coalescing = false expandEntityReferences = true ignoringComments = false ignoringElementContentWhitespace = false namespaceAware = true validating = false xIncludeAware = false
coalescing - the coalescingexpandEntityReferences - the expand entity referencesignoringComments - the ignoring commentsignoringElementContentWhitespace - the ignoring element content whitespacenamespaceAware - the namespace awarevalidating - the validatingxIncludeAware - the x include awareXmlDocumentBuilder configureFactoryAttribute(String name, Object value)
DocumentBuilderFactory.name - the namevalue - the valueDocumentBuilderFactory.setAttribute(String, Object)XmlDocumentBuilder configureFactoryFeature(String name, boolean value)
DocumentBuilderFactory.name - the namevalue - the valueDocumentBuilderFactory.setFeature(String, boolean)XmlDocumentBuilder configureFactorySchema(Schema schema)
DocumentBuilderFactory.schema - the schemaDocumentBuilderFactory.setSchema(Schema)XmlDocumentBuilder configureEntityResolver(EntityResolver entityResolver)
DocumentBuilder.entityResolver - the entity resolverDocumentBuilder.setEntityResolver(EntityResolver)XmlDocumentBuilder configureErrorHandler(ErrorHandler errorHandler)
DocumentBuilder.errorHandler - the error handlerDocumentBuilder.setErrorHandler(ErrorHandler)DocumentBuilder buildDocumentBuilder()
Document buildDocument()
Document buildDocument(File file)
file - the fileDocument buildDocument(String uri)
uri - the uriDocument buildDocument(InputSource is)
is - the input sourceDocument buildDocument(InputStream is)
is - the input streamDocument buildDocument(InputStream is, String systemId)
is - the input streamsystemId - the system idDocument buildDocument(Object jaxbElement, JAXBContext jaxbContext)
JAXBContext.jaxbElement - the jaxb elementjaxbContext - the jaxb contextDocument buildDocument(Object jaxbElement, Marshaller marshaller)
Marshaller.jaxbElement - the jaxb elementmarshaller - the marshallerstatic XmlDocumentBuilder builder()
Copyright © 2020 bremersee.org. All rights reserved.