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 Detail

      • Chars

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

        public Chars​(Element parent,
                     Node prevSibling,
                     java.lang.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 Detail

      • getData

        public java.lang.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:
        Node.getData()
      • getName

        public java.lang.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 java.lang.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​(java.io.OutputStream sOutFile,
                              DOMSaveOptions options,
                              int level,
                              Node prevSibling)
                       throws java.io.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:
        java.io.IOException
        See Also:
        Node.serialize(OutputStream, DOMSaveOptions, int, Node)
      • setScriptProperty

        public void setScriptProperty​(java.lang.String sPropertyName,
                                      Arg propertyValue)
      • setText

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