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

Class com.ibm.xml.parser.GeneralReference

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

public class GeneralReference
extends Parent
GeneralReference implements general references as defined by the Document Object Model (DOM).

There are two flavors of general references:

  1. Parsed entities: Parsed entities are declared in the internal or external DTD subsets, and are referenced one or more places in the document.
  2. Unparsed entities: Unparsed entities are used for embedding data that is not in XML format into the document. An example of an unparsed entitiy is an image.

General References do NOT include character references(e.g. "<" is referenced as "&#60;").

The object tree produced by the XML4J parser does NOT include General Reference Nodes because general references are expanded. If an application is sensitive to the existence of parsed entities, it should implement the ReferenceHandler interface.

Version:
1.1
See Also:
Parent, Child, ReferenceHandler

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

Constructor Summary
 GeneralReference(java.lang.String name)
Constructor.
 

Method Summary
java.lang.Object  clone()
Clone this General Reference Node and its children using the appropriate factories.
java.lang.String  getLanguage()
Returns the XML language ID (the value of the xml:lang Attribute) in use for this General Reference Node.
java.lang.String  getName()
Returns this General Reference's name.
int  getNodeType()
Returns that this object is a General Reference Node.
java.lang.String  getText()
Return all text associated with this Node and its children without considering entities.
 
Methods inherited from class com.ibm.xml.parser.Parent
 addElement, elements, getChildNodes, getChildrenArray, getFirstChild, hasChildNodes, insert, insertAfter, insertBefore, insertFirst, insertLast, removeChild, replaceChild
 
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

GeneralReference

public GeneralReference(java.lang.String name)
Constructor.
Parameters:
name - This General Reference's name. This is also the name of the entity being referred to by the General Reference.
Method Detail

clone

public java.lang.Object clone()
Clone this General Reference Node and its children using the appropriate factories.

This method is defined by Child.

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

getNodeType

public int getNodeType()
Returns that this object is a General Reference Node.

This method is defined by DOM.

Returns:
General Reference Node indicator.

getName

public java.lang.String getName()
Returns this General Reference's name.
Returns:
The string that is this General Reference's name (should never be null).

getText

public java.lang.String getText()
Return all text associated with this Node and its children without considering entities.

This method is defined by Child.

Returns:
Text associated with all children, or "" if no children.
Overrides:
getText in class Child
See Also:
toString

getLanguage

public java.lang.String getLanguage()
Returns the XML language ID (the value of the xml:lang Attribute) in use for this General Reference Node. If this General Reference Node has no explicitly defined language Attribute, Parent Nodes will be recursively checked.
Returns:
The XML language ID, or null if all Parents have no language ID.

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