net.sf.jaxme.util
Class DOMBuilder

java.lang.Object
  extended bynet.sf.jaxme.util.DOMBuilder
All 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,v 1.1 2003/08/29 18:07:58 joe Exp $
Author:
Jochen Wiedmann

Constructor Summary
DOMBuilder()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void endDocument()
           
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
           
 void endPrefixMapping(java.lang.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)
           
 void processingInstruction(java.lang.String pTarget, java.lang.String pData)
           
 void setDocument(Document pDocument)
          Sets the document being used as object factory.
 void setDocumentLocator(Locator pLocator)
          Sets the Locator.
 void setTarget(Node pNode)
          Sets the target node.
 void skippedEntity(java.lang.String pName)
           
 void startDocument()
           
 void startElement(java.lang.String pNamespaceURI, java.lang.String pLocalName, java.lang.String pQName, Attributes pAttr)
           
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOMBuilder

public DOMBuilder()
Method Detail

setDocument

public void setDocument(Document pDocument)

Sets the document being used as object factory.


getDocument

public Document getDocument()

Returns the document being used as object factory.


setDocumentLocator

public void setDocumentLocator(Locator pLocator)

Sets the Locator.

Specified by:
setDocumentLocator in interface ContentHandler

getDocumentLocator

public Locator getDocumentLocator()

Returns the Locator.


setTarget

public void setTarget(Node pNode)

Sets the target node. The document is built as a fragment in the target node.


getTarget

public Node getTarget()

Returns the target node. The document is built as a fragment in the target node.


startDocument

public void startDocument()
                   throws SAXException
Specified by:
startDocument in interface ContentHandler
Throws:
SAXException
See Also:
ContentHandler.startDocument()

endDocument

public void endDocument()
                 throws SAXException
Specified by:
endDocument in interface ContentHandler
Throws:
SAXException
See Also:
ContentHandler.endDocument()

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws SAXException
Specified by:
startPrefixMapping in interface ContentHandler
Throws:
SAXException

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
                      throws SAXException
Specified by:
endPrefixMapping in interface ContentHandler
Throws:
SAXException

startElement

public void startElement(java.lang.String pNamespaceURI,
                         java.lang.String pLocalName,
                         java.lang.String pQName,
                         Attributes pAttr)
                  throws SAXException
Specified by:
startElement in interface ContentHandler
Throws:
SAXException

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
                throws SAXException
Specified by:
endElement in interface ContentHandler
Throws:
SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws SAXException
Specified by:
characters in interface ContentHandler
Throws:
SAXException

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws SAXException
Specified by:
ignorableWhitespace in interface ContentHandler
Throws:
SAXException

processingInstruction

public void processingInstruction(java.lang.String pTarget,
                                  java.lang.String pData)
                           throws SAXException
Specified by:
processingInstruction in interface ContentHandler
Throws:
SAXException

skippedEntity

public void skippedEntity(java.lang.String pName)
                   throws SAXException
Specified by:
skippedEntity in interface ContentHandler
Throws:
SAXException