org.apache.ws.jaxme.xs.parser

Class DOMBuilder

public class DOMBuilder extends 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
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.

ElementgetResult()

Returns the result element.

voidignorableWhitespace(char[] ch, int start, int length)
voidprocessingInstruction(String pTarget, String pData)
voidsetDocumentLocator(Locator pLocator)

Sets the Locator.

voidskippedEntity(String pName)
voidstartDocument()
voidstartElement(String pNamespaceURI, String pLocalName, String pQName, Attributes pAttr)
voidstartPrefixMapping(String prefix, String uri)

Constructor Detail

DOMBuilder

public DOMBuilder()

Creates a new instance of DOMBuilder, which creates a new document. The document is available via {@link #getDocument()}.

DOMBuilder

public DOMBuilder(Node pTarget)

Creates a new instance of DOMBuilder, which creates a new element node in the given node. The created node is available via {@link #getResult()}.

Method Detail

characters

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

endDocument

public void endDocument()

See Also: org.xml.sax.ContentHandler#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. 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 {@link org.w3c.dom.Node#appendChild(org.w3c.dom.Node)}.<(p>

ignorableWhitespace

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

processingInstruction

public void processingInstruction(String pTarget, String pData)

setDocumentLocator

public void setDocumentLocator(Locator pLocator)

Sets the Locator.

skippedEntity

public void skippedEntity(String pName)

startDocument

public void startDocument()

See Also: org.xml.sax.ContentHandler#startDocument()

startElement

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

startPrefixMapping

public void startPrefixMapping(String prefix, String uri)