Package com.ctc.wstx.dom
Class DOMOutputElement
- java.lang.Object
-
- com.ctc.wstx.sw.OutputElementBase
-
- com.ctc.wstx.dom.DOMOutputElement
-
- All Implemented Interfaces:
NamespaceContext
public final class DOMOutputElement extends OutputElementBase
Context object that holds information about an open element (one for which START_ELEMENT has been sent, but no END_ELEMENT)
-
-
Field Summary
-
Fields inherited from class com.ctc.wstx.sw.OutputElementBase
mDefaultNsURI, mNsMapping, mNsMapShared, mRootNsContext, PREFIX_MISBOUND, PREFIX_OK, PREFIX_UNBOUND
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAttribute(String pname, String value)protected voidaddAttribute(String uri, String qname, String value)protected voidaddToPool(DOMOutputElement poolHead)Method called to temporarily link this instance to a pool, to allow reusing of instances with the same reader.voidappendChild(Node n)protected voidappendNode(Node n)protected DOMOutputElementcreateAndAttachChild(Element element)Simplest factory method, which gets called when a 1-argument element output method is called.protected DOMOutputElementcreateChild(Element element)static DOMOutputElementcreateRoot(Node rootNode)StringgetNameDesc()DOMOutputElementgetParent()booleanisRoot()protected DOMOutputElementreuseAsChild(DOMOutputElement parent, Element element)voidsetDefaultNsUri(String uri)protected voidsetRootNsContext(NamespaceContext ctxt)-
Methods inherited from class com.ctc.wstx.sw.OutputElementBase
addPrefix, generateMapping, getDefaultNsUri, getExplicitPrefix, getNamespaceURI, getPrefix, getPrefixes, isPrefixValid, relink, throwOutputError
-
-
-
-
Method Detail
-
createRoot
public static DOMOutputElement createRoot(Node rootNode)
-
createAndAttachChild
protected DOMOutputElement createAndAttachChild(Element element)
Simplest factory method, which gets called when a 1-argument element output method is called. It is, then, assumed to use the default namespace. Will both create the child element and attach it to parent element, or lacking own owner document.
-
createChild
protected DOMOutputElement createChild(Element element)
-
reuseAsChild
protected DOMOutputElement reuseAsChild(DOMOutputElement parent, Element element)
- Returns:
- New head of the recycle pool
-
addToPool
protected void addToPool(DOMOutputElement poolHead)
Method called to temporarily link this instance to a pool, to allow reusing of instances with the same reader.
-
getParent
public DOMOutputElement getParent()
-
isRoot
public boolean isRoot()
- Specified by:
isRootin classOutputElementBase
-
getNameDesc
public String getNameDesc()
- Specified by:
getNameDescin classOutputElementBase- Returns:
- String presentation of the fully-qualified name, in "prefix:localName" format (no URI). Useful for error and debugging messages.
-
setDefaultNsUri
public void setDefaultNsUri(String uri)
- Specified by:
setDefaultNsUriin classOutputElementBase
-
setRootNsContext
protected void setRootNsContext(NamespaceContext ctxt)
- Specified by:
setRootNsContextin classOutputElementBase
-
appendNode
protected void appendNode(Node n)
-
appendChild
public void appendChild(Node n)
-
-