org.apache.ws.jaxme.util

Class DOMBuilder

Implemented Interfaces:
ContentHandler

public class DOMBuilder
extends java.lang.Object
implements ContentHandler

Converts a stream of SAX events into a DOM node.
Version:
$Id: DOMBuilder.java 231826 2004-04-18 19:15:30Z jochen $
Author:
Jochen Wiedmann

Method Summary

void
characters(char[] ch, int start, int length)
void
endDocument()
void
endElement(String namespaceURI, String localName, String qName)
void
endPrefixMapping(String prefix)
Document
getDocument()
Returns the document being used as object factory.
Locator
getDocumentLocator()
Returns the Locator.
Node
getTarget()
Returns the target node.
void
ignorableWhitespace(char[] ch, int start, int length)
boolean
isPrefixMappingIsAttribute()
Sets whether the event startPrefixMapping(String,String) shall create an xmlns 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 event startPrefixMapping(String,String) shall create an xmlns attribute.
void
setTarget(Node pNode)
Sets the target node.
void
skippedEntity(String pName)
void
startDocument()
void
startElement(String pNamespaceURI, String pLocalName, String pQName, Attributes pAttr)
void
startPrefixMapping(String prefix, String uri)

Method Details

characters

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

endDocument

public void endDocument()
            throws SAXException
See Also:
org.xml.sax.ContentHandler.endDocument()

endElement

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

endPrefixMapping

public void endPrefixMapping(String prefix)
            throws SAXException

getDocument

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

getDocumentLocator

public Locator getDocumentLocator()
Returns the Locator.

getTarget

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

ignorableWhitespace

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

isPrefixMappingIsAttribute

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

processingInstruction

public void processingInstruction(String pTarget,
                                  String pData)
            throws SAXException

setDocument

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

setDocumentLocator

public void setDocumentLocator(Locator pLocator)
Sets the Locator.

setPrefixMappingIsAttribute

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

setTarget

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

skippedEntity

public void skippedEntity(String pName)
            throws SAXException

startDocument

public void startDocument()
            throws SAXException
See Also:
org.xml.sax.ContentHandler.startDocument()

startElement

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

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
            throws SAXException