org.apache.ws.jaxme.xs.parser

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 231785 2004-02-16 23:39:59Z jochen $
Author:
Jochen Wiedmann

Constructor Summary

DOMBuilder()
Creates a new instance of DOMBuilder, which creates a new document.
DOMBuilder(Node pTarget)
Creates a new instance of DOMBuilder, which creates a new element node in the given node.

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.
Element
getResult()
Returns the result element.
void
ignorableWhitespace(char[] ch, int start, int length)
void
processingInstruction(String pTarget, String pData)
void
setDocumentLocator(Locator pLocator)
Sets the Locator.
void
skippedEntity(String pName)
void
startDocument()
void
startElement(String pNamespaceURI, String pLocalName, String pQName, Attributes pAttr)
void
startPrefixMapping(String prefix, String uri)

Constructor Details

DOMBuilder

public DOMBuilder()
            throws ParserConfigurationException

DOMBuilder

public DOMBuilder(Node pTarget)

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. In the case of the empty constructor, this is a new document. Otherwise it is the target nodes owner document.

getDocumentLocator

public Locator getDocumentLocator()
Returns the Locator.

getResult

public Element getResult()
Returns the result element. In the case of the default constructor, this is the document element. Otherwise it is added to the target node via org.w3c.dom.Node.appendChild(org.w3c.dom.Node).<(p>

ignorableWhitespace

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

processingInstruction

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

setDocumentLocator

public void setDocumentLocator(Locator pLocator)
Sets the Locator.

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