Class SimpleOutputElement

java.lang.Object
com.ctc.wstx.sw.OutputElementBase
com.ctc.wstx.sw.SimpleOutputElement
All Implemented Interfaces:
NamespaceContext

public final class SimpleOutputElement extends OutputElementBase
Class that encapsulates information about a specific element in virtual output stack for namespace-aware writers. It provides support for URI-to-prefix mappings as well as namespace mapping generation.

One noteworthy feature of the class is that it is designed to allow "short-term recycling", ie. instances can be reused within context of a simple document output. While reuse/recycling of such lightweight object is often useless or even counter productive, here it may be worth using, due to simplicity of the scheme (basically using a very simple free-elements linked list).

  • Field Details

    • mParent

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

      protected String mPrefix
      Prefix that is used for the element. Can not be final, since sometimes it needs to be dynamically generated and bound after creating the element instance.
    • mLocalName

      protected String mLocalName
      Local name of the element. Non-final only to allow reuse.
    • mURI

      protected String mURI
      Namespace of the element, whatever mPrefix maps to. Non-final only to allow reuse.
    • mAttrSet

      Map used to check for duplicate attribute declarations, if feature is enabled.
  • Constructor Details

  • Method Details