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 TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidvoidendElement(String namespaceURI, String localName, String qName) voidendPrefixMapping(String prefix) Returns the document being used as object factory.Returns the Locator.Returns the target node.voidignorableWhitespace(char[] ch, int start, int length) booleanSets whether the eventstartPrefixMapping(java.lang.String, java.lang.String)shall create anxmlnsattribute.voidprocessingInstruction(String pTarget, String pData) voidsetDocument(Document pDocument) Sets the document being used as object factory.voidsetDocumentLocator(Locator pLocator) Sets the Locator.voidsetPrefixMappingIsAttribute(boolean pPrefixMappingIsAttribute) Returns whether the eventstartPrefixMapping(java.lang.String, java.lang.String)shall create anxmlnsattribute.voidSets the target node.voidskippedEntity(String pName) voidvoidstartElement(String pNamespaceURI, String pLocalName, String pQName, Attributes pAttr) voidstartPrefixMapping(String prefix, String uri) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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 anxmlnsattribute. Defaults to false.- Returns:
- True, if
xmlnsattributes are being created, false otherwise.
-
setPrefixMappingIsAttribute
public void setPrefixMappingIsAttribute(boolean pPrefixMappingIsAttribute) Returns whether the eventstartPrefixMapping(java.lang.String, java.lang.String)shall create anxmlnsattribute. Defaults to false.- Parameters:
pPrefixMappingIsAttribute- True, ifxmlnsattributes 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:
setDocumentLocatorin 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:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
startElement
public void startElement(String pNamespaceURI, String pLocalName, String pQName, Attributes pAttr) throws SAXException - Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-