Contents | Package | Class | Tree | Deprecated | Index | Help | XML for Java
PREV | NEXT | SHOW LISTS | HIDE LISTS |

# Class com.ibm.xml.parser.TXPI

    java.lang.Object
        |
        +----com.ibm.xml.parser.Child
                |
                +----com.ibm.xml.parser.TXPI

Subclasses:
  NamespacePI, StylesheetPI, TreeFactory.TreePI

public class TXPI
extends Child
implements PI, Namespace

The TXPI class implements the PI interface as defined by the Document Object Model (DOM), and implements the Namespace interface as defined by the W3C.

A PI Node is a "processing instruction" for use by XML4J or an application. The content of the PI Node is the entire content between the delimiters of the processing instruction.

Version:
  1.1
See Also:
  PI, Namespace, Child

Fields inherited from class com.ibm.xml.parser.Child
ATTDEF, ATTLIST, DOCUMENTTYPE, ELEMENTDEFINITION, ENTITY, GENERALREFERENCE, NOTATION, PSEUDONODE

Constructor Summary
TXPI(java.lang.String name, java.lang.String data) Constructor.

Method Summary
java.lang.Object | clone() Clone this PI Node using the appropriate factory.
java.lang.String | getData() Returns the data of the PI.
java.lang.String | getName() Returns the qualified name of this PI.
int | getNodeType() Returns that this object is a PI Node.
java.lang.String | getNSLocalName() Returns the local name of the Namespace.
java.lang.String | getNSName() Returns the Namespace URI.
java.lang.String | getText() Return all text associated with this Node without considering entities.
java.lang.String | getUniversalName() If namespace support is enabled and the PI's name contains a prefix name, return a string of `getNSName()+":"+getNSLocalName()`; otherwise, return `getNSLocalName()` .
void | setData(java.lang.String data) Sets the data of the PI.
void | setName(java.lang.String name) Sets the name of the PI.
void | setNSLocalName(java.lang.String nsLocalName) Sets the local name of the Namespace.
void | setNSName(java.lang.String nsURI) Sets the Namespace URI.

Methods inherited from class com.ibm.xml.parser.Child
clearDigest, clone, getChildNodes, getDigest, getFactory, getFirstChild, getNextSibling, getParentNode, getPreviousSibling, getText, hasChildNodes, insertBefore, makeXPointer, print, print, removeChild, replaceChild, searchAncestors, searchAncestors, setFactory, toString, toString

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

### TXPI

    public TXPI(java.lang.String name,
                java.lang.String data)

  Constructor.
  Parameters:
    `name` - The first token following the markup.
    `data` - From the character immediately after name to the character immediately preceding the `?>`.

Method Detail

### clone

    public java.lang.Object clone()

  Clone this PI Node using the appropriate factory.

  This method is defined by Child.

  Returns:
    Cloned PI Node.
  Overrides:
    clone in class Child
  See Also:
    clone

### getNodeType

    public int getNodeType()

  Returns that this object is a PI Node.

  This method is defined by DOM.

  Returns:
    PI Node indicator.

### getName

    public java.lang.String getName()

  Returns the qualified name of this PI. The name is the first token following the markup. If this PI's name has a namespace prefix, the prefix will still be attached.

  This method is defined by Namespace.

  Implements:
    getName in interface PI
  Returns:
    The PI name, or null if no name.
  See Also:
    setName

### setName

    public void setName(java.lang.String name)

  Sets the name of the PI. The name is the first token following the markup.
  Implements:
    setName in interface PI
  Parameters:
    `name` - The PI name.
  See Also:
    getName

### getData

    public java.lang.String getData()

  Returns the data of the PI. The PI data is from the character immediately after the PI name to the character immediately preceding the `?>`.
  Implements:
    getData in interface PI
  Returns:
    The PI data, or null if no data.
  See Also:
    setData

### setData

    public void setData(java.lang.String data)

  Sets the data of the PI. The PI data is from the character immediately after the PI name to the character immediately preceding the `?>`.
  Implements:
    setData in interface PI
  Parameters:
    `data` - The PI data.
  See Also:
    getData

### getText

    public java.lang.String getText()

  Return all text associated with this Node without considering entities.

  This method is defined by Child.

  Returns:
    Always returns "".
  Overrides:
    getText in class Child
  See Also:
    toString

### getNSLocalName

    public java.lang.String getNSLocalName()

  Returns the local name of the Namespace.

  This method is defined by Namespace.

  Implements:
    getNSLocalName in interface Namespace
  Returns:
    The Namespace local name, or null if no local name.
  See Also:
    Namespace, setNSLocalName

### setNSLocalName

    public void setNSLocalName(java.lang.String nsLocalName)

  Sets the local name of the Namespace.

  This method is defined by Namespace.

  Implements:
    setNSLocalName in interface Namespace
  Parameters:
    `nsLocalName` - The Namespace local name.
  See Also:
    Namespace, getNSLocalName

### getNSName

    public java.lang.String getNSName()

  Returns the Namespace URI.

  This method is defined by Namespace.

  Implements:
    getNSName in interface Namespace
  Returns:
    The Namespace URI, or null if the tag name does not contain a prefix name or XML4J parser namespace processing is disabled.
  See Also:
    setNSName, setProcessNamespace, Namespace

### setNSName

    public void setNSName(java.lang.String nsURI)

  Sets the Namespace URI.

  This method is defined by Namespace.

  Implements:
    setNSName in interface Namespace
  Parameters:
    `nsURI` - The Namespace URI, or null if no name.
  See Also:
    getNSName, Namespace

### getUniversalName

    public java.lang.String getUniversalName()

  If namespace support is enabled and the PI's name contains a prefix name, return a string of `getNSName()+":"+getNSLocalName()`; otherwise, return `getNSLocalName()` .
  Implements:
    getUniversalName in interface Namespace
  Returns:
    The universal name, or null if this PI's name does not contain a prefix name or XML4J parser namespace processing is disabled.
  See Also:
    getNSName, getNSLocalName, setProcessNamespace

Contents | Package | Class | Tree | Deprecated | Index | Help |
PREV | NEXT | SHOW LISTS | HIDE LISTS |