Top Description Fields Constructors Methods
com.ctc.wstx.dom

public final Class DOMOutputElement

extends OutputElementBase
Class Inheritance
Imports
javax.xml.namespace.NamespaceContext, org.w3c.dom.Element, .Node, com.ctc.wstx.sw.OutputElementBase, com.ctc.wstx.util.BijectiveNsMap

Context object that holds information about an open element (one for which START_ELEMENT has been sent, but no END_ELEMENT)

Field Summary

Modifier and TypeField and Description
private boolean
private Element
mElement

Actual DOM element for which this element object acts as a proxy.

private DOMOutputElement
mParent

Reference to the parent element, element enclosing this element.

private final Node
mRootNode

DOM node that is the root under which content is written, in case where there is no parent (mParent == null).

Inherited from com.ctc.wstx.sw.OutputElementBase:
DEFAULT_XML_BINDINGSmDefaultNsURImNsMappingmNsMapSharedmRootNsContextPREFIX_MISBOUNDPREFIX_OKPREFIX_UNBOUNDsXmlNsPrefixsXmlNsURI

Constructor Summary

AccessConstructor and Description
private
DOMOutputElement(Node rootNode)

Constructor for the virtual root element

private

Method Summary

Modifier and TypeMethod and Description
protected void
addAttribute(String pname, String value)

protected void
addAttribute(String uri, String qname, String value)

protected void
addToPool(DOMOutputElement poolHead)

Method called to temporarily link this instance to a pool, to allow reusing of instances with the same reader.

public void
protected void
protected DOMOutputElement
createAndAttachChild(Element element)

Simplest factory method, which gets called when a 1-argument element output method is called.

protected DOMOutputElement
public static DOMOutputElement
createRoot(Node rootNode)

public String

Returns:

String presentation of the fully-qualified name, in "prefix:localName" format (no URI). Useful for error and debugging messages.
getNameDesc
()

Implements abstract com.ctc.wstx.sw.OutputElementBase.getNameDesc.

public DOMOutputElement
public boolean
protected DOMOutputElement

Returns:

New head of the recycle pool
reuseAsChild
(DOMOutputElement parent, Element element)

public void
protected void
Inherited from com.ctc.wstx.sw.OutputElementBase:
addPrefixgenerateMappinggetDefaultNsUrigetExplicitPrefixgetNamespaceURIgetPrefixgetPrefixesisPrefixValidrelinkthrowOutputError

Field Detail

mDefaultNsSetback to summary
private boolean mDefaultNsSet
mElementback to summary
private Element mElement

Actual DOM element for which this element object acts as a proxy.

mParentback to summary
private DOMOutputElement mParent

Reference to the parent element, element enclosing this element. Null for root element. Non-final to allow temporary pooling (on per-writer basis, to keep these short-lived).

mRootNodeback to summary
private final Node mRootNode

DOM node that is the root under which content is written, in case where there is no parent (mParent == null). If mParent is not null, this will be null. Value is of type Document, DocumentFragment or Element

Constructor Detail

DOMOutputElementback to summary
private DOMOutputElement(Node rootNode)

Constructor for the virtual root element

DOMOutputElementback to summary
private DOMOutputElement(DOMOutputElement parent, Element element, BijectiveNsMap ns)

Method Detail

addAttributeback to summary
protected void addAttribute(String pname, String value)
addAttributeback to summary
protected void addAttribute(String uri, String qname, String value)
addToPoolback to summary
protected void addToPool(DOMOutputElement poolHead)

Method called to temporarily link this instance to a pool, to allow reusing of instances with the same reader.

appendChildback to summary
public void appendChild(Node n)
appendNodeback to summary
protected void appendNode(Node n)
createAndAttachChildback to summary
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.

createChildback to summary
protected DOMOutputElement createChild(Element element)
createRootback to summary
public static DOMOutputElement createRoot(Node rootNode)
getNameDescback to summary
public String getNameDesc()

Implements abstract com.ctc.wstx.sw.OutputElementBase.getNameDesc.

Returns:String

String presentation of the fully-qualified name, in "prefix:localName" format (no URI). Useful for error and debugging messages.

Annotations
@Override
getParentback to summary
public DOMOutputElement getParent()
isRootback to summary
public boolean isRoot()

Implements abstract com.ctc.wstx.sw.OutputElementBase.isRoot.

Annotations
@Override
reuseAsChildback to summary
protected DOMOutputElement reuseAsChild(DOMOutputElement parent, Element element)
Returns:DOMOutputElement

New head of the recycle pool

setDefaultNsUriback to summary
public void setDefaultNsUri(String uri)

Implements abstract com.ctc.wstx.sw.OutputElementBase.setDefaultNsUri.

Annotations
@Override
setRootNsContextback to summary
protected void setRootNsContext(NamespaceContext ctxt)

Implements abstract com.ctc.wstx.sw.OutputElementBase.setRootNsContext.

Annotations
@Override