org.apache.ws.commons.serialize

Class DOMBuilder

public class DOMBuilder extends Object implements ContentHandler

Converts a stream of SAX events into a DOM node.
Method Summary
voidcharacters(char[] ch, int start, int length)
voidendDocument()
voidendElement(String namespaceURI, String localName, String qName)
voidendPrefixMapping(String prefix)
DocumentgetDocument()
Returns the document being used as object factory.
LocatorgetDocumentLocator()
Returns the Locator.
NodegetTarget()
Returns the target node.
voidignorableWhitespace(char[] ch, int start, int length)
booleanisPrefixMappingIsAttribute()
Sets whether the event DOMBuilder shall create an xmlns attribute.
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 event DOMBuilder shall create an xmlns attribute.
voidsetTarget(Node pNode)
Sets the target node.
voidskippedEntity(String pName)
voidstartDocument()
voidstartElement(String pNamespaceURI, String pLocalName, String pQName, Attributes pAttr)
voidstartPrefixMapping(String prefix, String uri)

Method Detail

characters

public void characters(char[] ch, int start, int length)

endDocument

public void endDocument()

endElement

public void endElement(String namespaceURI, String localName, String qName)

endPrefixMapping

public void endPrefixMapping(String prefix)

getDocument

public Document getDocument()
Returns the document being used as object factory.

Returns: pDocument The object factory.

getDocumentLocator

public Locator getDocumentLocator()
Returns the Locator.

Returns: The documents Locator.

getTarget

public Node getTarget()
Returns the target node. The document is built as a fragment in the target node.

Returns: The target node.

ignorableWhitespace

public void ignorableWhitespace(char[] ch, int start, int length)

isPrefixMappingIsAttribute

public boolean isPrefixMappingIsAttribute()
Sets whether the event DOMBuilder shall create an xmlns attribute. Defaults to false.

Returns: True, if xmlns attributes are being created, false otherwise.

processingInstruction

public void processingInstruction(String pTarget, String pData)

setDocument

public void setDocument(Document pDocument)
Sets the document being used as object factory.

Parameters: pDocument The object factory.

setDocumentLocator

public void setDocumentLocator(Locator pLocator)
Sets the Locator.

Parameters: pLocator The Locator being set.

setPrefixMappingIsAttribute

public void setPrefixMappingIsAttribute(boolean pPrefixMappingIsAttribute)
Returns whether the event DOMBuilder shall create an xmlns attribute. Defaults to false.

Parameters: pPrefixMappingIsAttribute True, if xmlns attributes are being created, false otherwise.

setTarget

public void setTarget(Node pNode)
Sets the target node. The document is built as a fragment in the target node.

Parameters: pNode The target node.

skippedEntity

public void skippedEntity(String pName)

startDocument

public void startDocument()

startElement

public void startElement(String pNamespaceURI, String pLocalName, String pQName, Attributes pAttr)

startPrefixMapping

public void startPrefixMapping(String prefix, String uri)
Copyright © 2005-2009 Apache Software Foundation. All Rights Reserved.