Package org.apache.struts2.util
Class DomHelper.DOMBuilder
java.lang.Object
org.apache.struts2.util.DomHelper.DOMBuilder
- All Implemented Interfaces:
- ContentHandler
- Enclosing class:
- DomHelper
The 
DOMBuilder is a utility class that will generate a W3C
 DOM Document from SAX events.- Author:
- Carsten Ziegeler
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected SAXTransformerFactoryThe transformer factoryprotected static SAXTransformerFactoryThe default transformer factory shared by all instancesprotected ContentHandlerprotected NodeThe parentNodeprotected DOMResultThe result
- 
Constructor SummaryConstructorsConstructorDescriptionConstruct a new instance of this DOMBuilder.DOMBuilder(SAXTransformerFactory factory) Construct a new instance of this DOMBuilder.DOMBuilder(SAXTransformerFactory factory, Node parentNode) Construct a new instance of this DOMBuilder.DOMBuilder(Node parentNode) Constructs a new instance that appends nodes to the given parent node.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcharacters(char[] arg0, int arg1, int arg2) voidvoidendElement(String arg0, String arg1, String arg2) voidendPrefixMapping(String arg0) Return the newly built Document.voidignorableWhitespace(char[] arg0, int arg1, int arg2) voidprocessingInstruction(String arg0, String arg1) voidsetDocumentLocator(Locator locator) voidskippedEntity(String arg0) voidvoidstartElement(String uri, String loc, String raw, Attributes attrs) voidstartPrefixMapping(String arg0, String arg1) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandlerdeclaration
- 
Field Details- 
FACTORYThe default transformer factory shared by all instances
- 
factoryThe transformer factory
- 
resultThe result
- 
parentNodeThe parentNode
- 
nextHandler
 
- 
- 
Constructor Details- 
DOMBuilderpublic DOMBuilder()Construct a new instance of this DOMBuilder.
- 
DOMBuilderConstruct a new instance of this DOMBuilder.- Parameters:
- factory- the SAX transformer factory
 
- 
DOMBuilderConstructs a new instance that appends nodes to the given parent node.- Parameters:
- parentNode- the parent node
 
- 
DOMBuilderConstruct a new instance of this DOMBuilder.- Parameters:
- factory- the SAX transformer factory
- parentNode- the parent node
 
 
- 
- 
Method Details- 
getDocumentReturn the newly built Document.- Returns:
- the W3C Document
 
- 
setDocumentLocator- Specified by:
- setDocumentLocatorin interface- ContentHandler
 
- 
startDocument- Specified by:
- startDocumentin interface- ContentHandler
- Throws:
- SAXException
 
- 
endDocument- Specified by:
- endDocumentin interface- ContentHandler
- Throws:
- SAXException
 
- 
startElement- Specified by:
- startElementin interface- ContentHandler
- Throws:
- SAXException
 
- 
endElement- Specified by:
- endElementin interface- ContentHandler
- Throws:
- SAXException
 
- 
startPrefixMapping- Specified by:
- startPrefixMappingin interface- ContentHandler
- Throws:
- SAXException
 
- 
endPrefixMapping- Specified by:
- endPrefixMappingin interface- ContentHandler
- Throws:
- SAXException
 
- 
characters- Specified by:
- charactersin interface- ContentHandler
- Throws:
- SAXException
 
- 
ignorableWhitespace- Specified by:
- ignorableWhitespacein interface- ContentHandler
- Throws:
- SAXException
 
- 
processingInstruction- Specified by:
- processingInstructionin interface- ContentHandler
- Throws:
- SAXException
 
- 
skippedEntity- Specified by:
- skippedEntityin interface- ContentHandler
- Throws:
- SAXException
 
 
-