Package com.adobe.xfa

Class Chars

All Implemented Interfaces:
Peer
Direct Known Subclasses:
TextNode

public class Chars extends Node
A class to represent the XML character data nodes in the DOM.
  • Constructor Details

    • Chars

      public Chars(Element parent, Node prevSibling, char[] text, int start, int length)
    • Chars

      public Chars(Element parent, Node prevSibling, String text)
      Instantiates a character data node with the given text.
      Parameters:
      parent - the node's parent, if any.
      prevSibling - the node's previous sibling, if any.
      text - the node's text.
  • Method Details

    • clone

      public Node clone(Element parent)
      Specified by:
      clone in class Node
    • getData

      public String getData()
      Description copied from class: Node
      Gets this node's data.
      Overrides:
      getData in class Node
      Returns:
      the data appropriate for the various node types.
      See Also:
    • getName

      public String getName()
      Gets this node's name.
      Specified by:
      getName in class Node
      Returns:
      the character data name, which is the constant value "".
    • getText

      public String getText()
      Gets this node's text.
      Returns:
      the character data text.
    • isLeaf

      public boolean isLeaf()
      Description copied from class: Node
      Is this node is a leaf.
      Specified by:
      isLeaf in class Node
      Returns:
      true if this node is a leaf and false otherwise.
    • isXMLSpace

      public boolean isXMLSpace()
      Determines if this character data node consists entirely of XML white spaces. In XML, a white space is defined as a space, carriage return, linefeed or tab (i.e. U+0020, U+000A, U+000D, U+0009).
      Returns:
      true if this node's text consists entirely of XML whitespace characters, and false otherwise.
    • isXMLSpace

      public static boolean isXMLSpace(int offset, int length, char[] chars)
    • postSave

      public void postSave()
      Specified by:
      postSave in class Node
    • preSave

      public void preSave(boolean bSaveXMLScript)
      Specified by:
      preSave in class Node
    • serialize

      public void serialize(OutputStream sOutFile, DOMSaveOptions options, int level, Node prevSibling) throws IOException
      Description copied from class: Node
      The helper function used by saveXML()
      Specified by:
      serialize in class Node
      Parameters:
      sOutFile - Streamfile to write to
      options - save options
      level - the indent level
      prevSibling - our previous sibling -- needed for some markup options.
      Throws:
      IOException
      See Also:
    • setScriptProperty

      public void setScriptProperty(String sPropertyName, Arg propertyValue)
    • setText

      public void setText(String text)
      Sets this node's text.
      Parameters:
      text - the text.