Package com.fasterxml.aalto.dom
Class DOMOutputElement
- java.lang.Object
-
- com.fasterxml.aalto.dom.OutputElementBase
-
- com.fasterxml.aalto.dom.DOMOutputElement
-
- All Implemented Interfaces:
javax.xml.namespace.NamespaceContext
public 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)- Author:
- Tatu Saloranta
-
-
Field Summary
-
Fields inherited from class com.fasterxml.aalto.dom.OutputElementBase
_defaultNsURI, _nsMapping, _nsMapShared, _rootNsContext, PREFIX_MISBOUND, PREFIX_OK, PREFIX_UNBOUND
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAttribute(java.lang.String pname, java.lang.String value)protected voidaddAttribute(java.lang.String uri, java.lang.String qname, java.lang.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(org.w3c.dom.Node n)protected voidappendNode(org.w3c.dom.Node n)protected DOMOutputElementcreateAndAttachChild(org.w3c.dom.Element element)Simplest factory method, which gets called when a 1-argument element output method is called.protected DOMOutputElementcreateChild(org.w3c.dom.Element element)static DOMOutputElementcreateRoot()java.lang.StringgetNameDesc()DOMOutputElementgetParent()booleanisRoot()protected DOMOutputElementreuseAsChild(DOMOutputElement parent, org.w3c.dom.Element element)voidsetDefaultNsUri(java.lang.String uri)protected voidsetRootNsContext(javax.xml.namespace.NamespaceContext ctxt)-
Methods inherited from class com.fasterxml.aalto.dom.OutputElementBase
addPrefix, generateMapping, getDefaultNsUri, getExplicitPrefix, getNamespaceURI, getPrefix, getPrefixes, isPrefixValid, relink, throwOutputError
-
-
-
-
Method Detail
-
createRoot
public static DOMOutputElement createRoot()
-
createAndAttachChild
protected DOMOutputElement createAndAttachChild(org.w3c.dom.Element element)
Simplest factory method, which gets called when a 1-argument element output method is called. Element is assumed to use the current default namespace. Will both create the child element and attach it to parent element, or lacking own owner document.
-
createChild
protected DOMOutputElement createChild(org.w3c.dom.Element element)
-
reuseAsChild
protected DOMOutputElement reuseAsChild(DOMOutputElement parent, org.w3c.dom.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 java.lang.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(java.lang.String uri)
- Specified by:
setDefaultNsUriin classOutputElementBase
-
setRootNsContext
protected void setRootNsContext(javax.xml.namespace.NamespaceContext ctxt)
- Specified by:
setRootNsContextin classOutputElementBase
-
appendNode
protected void appendNode(org.w3c.dom.Node n)
-
addAttribute
protected void addAttribute(java.lang.String pname, java.lang.String value)
-
addAttribute
protected void addAttribute(java.lang.String uri, java.lang.String qname, java.lang.String value)
-
appendChild
public void appendChild(org.w3c.dom.Node n)
-
-