Package org.apache.ws.commons.serialize
Class DOMBuilder
java.lang.Object
org.apache.ws.commons.serialize.DOMBuilder
- All Implemented Interfaces:
ContentHandler
Converts a stream of SAX events into a DOM node.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
void
endElement
(String namespaceURI, String localName, String qName) void
endPrefixMapping
(String prefix) Returns the document being used as object factory.Returns the Locator.Returns the target node.void
ignorableWhitespace
(char[] ch, int start, int length) boolean
Sets whether the eventstartPrefixMapping(java.lang.String, java.lang.String)
shall create anxmlns
attribute.void
processingInstruction
(String pTarget, String pData) void
setDocument
(Document pDocument) Sets the document being used as object factory.void
setDocumentLocator
(Locator pLocator) Sets the Locator.void
setPrefixMappingIsAttribute
(boolean pPrefixMappingIsAttribute) Returns whether the eventstartPrefixMapping(java.lang.String, java.lang.String)
shall create anxmlns
attribute.void
Sets the target node.void
skippedEntity
(String pName) void
void
startElement
(String pNamespaceURI, String pLocalName, String pQName, Attributes pAttr) void
startPrefixMapping
(String prefix, String uri) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
document
-
target
-
currentNode
-
locator
-
prefixMappingIsAttribute
private boolean prefixMappingIsAttribute -
prefixes
-
-
Constructor Details
-
DOMBuilder
public DOMBuilder()
-
-
Method Details
-
isPrefixMappingIsAttribute
public boolean isPrefixMappingIsAttribute()Sets whether the eventstartPrefixMapping(java.lang.String, java.lang.String)
shall create anxmlns
attribute. Defaults to false.- Returns:
- True, if
xmlns
attributes are being created, false otherwise.
-
setPrefixMappingIsAttribute
public void setPrefixMappingIsAttribute(boolean pPrefixMappingIsAttribute) Returns whether the eventstartPrefixMapping(java.lang.String, java.lang.String)
shall create anxmlns
attribute. Defaults to false.- Parameters:
pPrefixMappingIsAttribute
- True, ifxmlns
attributes are being created, false otherwise.
-
setDocument
Sets the document being used as object factory.- Parameters:
pDocument
- The object factory.
-
getDocument
Returns the document being used as object factory.- Returns:
- pDocument The object factory.
-
setDocumentLocator
Sets the Locator.- Specified by:
setDocumentLocator
in interfaceContentHandler
- Parameters:
pLocator
- The Locator being set.
-
getDocumentLocator
Returns the Locator.- Returns:
- The documents Locator.
-
setTarget
Sets the target node. The document is built as a fragment in the target node.- Parameters:
pNode
- The target node.
-
getTarget
Returns the target node. The document is built as a fragment in the target node.- Returns:
- The target node.
-
startDocument
- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
startElement
public void startElement(String pNamespaceURI, String pLocalName, String pQName, Attributes pAttr) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
skippedEntity
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-