All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.xml.parser.TXDocument

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

public class TXDocument
extends Parent
implements Document
Version:
19980204

Constructor Index

 o TXDocument()

Method Index

 o addElement(Child)
Add child.
 o clone()
Clone this instance including children.
 o getDocumentElement()
[DOM] Return a root element.
 o getDocumentType()
[DOM]
 o getDTD()
Return DTD instance.
 o getEncoding()
Return encoding name.
 o getNodeType()
[DOM] Return Node.NodeType.DOCUMENT
 o getRootElement()
Return root Element. Deprecated.
 o getRootName()
Return a name of root element in the document, not in DTD.
 o getStandalone()
Return "yes" or "no".
 o getText()
Print all text included in this element.
 o getVersion()
Return XML version of the document.
 o insert(Child, int)
Insert a Child instance into specified position.
 o isApplySyntax()
Return boolean if processor checks syntax.
 o print(PrintWriter)
Print the document to specified stream in XML format.
 o print(PrintWriter, String)
Print the document to specified stream in XML format.
 o print(PrintWriter, String, int)
Print the document to specified stream in XML format.
 o setDocumentElement(Element)
[DOM] Set a root element.
 o setDocumentType(Node)
[DOM]
 o setEncoding(String)
Set encoding of the document.
 o setPrintInternalDTD(boolean)
Set if print() method prints internal DTD.
 o setStandalone(String)
Set `standalone' value.
 o setVersion(String)
Set XML version.

Constructors

 o TXDocument
 public TXDocument()

Methods

 o getNodeType
 public int getNodeType()
[DOM] Return Node.NodeType.DOCUMENT

Overrides:
getNodeType in class Child
 o setDocumentType
 public void setDocumentType(Node documentType)
[DOM]

 o getDocumentType
 public Node getDocumentType()
[DOM]

 o setDocumentElement
 public void setDocumentElement(Element documentElement)
[DOM] Set a root element.

 o getDocumentElement
 public Element getDocumentElement()
[DOM] Return a root element.

 o clone
 public synchronized Object clone()
Clone this instance including children.

Overrides:
clone in class Child
 o setStandalone
 public void setStandalone(String rv)
Set `standalone' value.

 o getStandalone
 public String getStandalone()
Return "yes" or "no".

 o setVersion
 public void setVersion(String v)
Set XML version. i.e. "1.0"

 o getVersion
 public String getVersion()
Return XML version of the document.

Returns:
null if the document has no `<?xml ...>'
 o setEncoding
 public void setEncoding(String v)
Set encoding of the document. This value is used in `<?xml ...>' when the document is printed.

Parameters:
v - MIME charset name
 o getEncoding
 public String getEncoding()
Return encoding name. Return the value in `<?xml ... encoding="...">' as is or a value set by setEncoding() method.

Returns:
null if encoding is not specified.
 o isApplySyntax
 public boolean isApplySyntax()
Return boolean if processor checks syntax.

Returns:
true when `standalone' value isn't "no"
 o getRootName
 public String getRootName()
Return a name of root element in the document, not in DTD.

 o insert
 public void insert(Child ch,
                    int ind)
Insert a Child instance into specified position.

Overrides:
insert in class Parent
 o addElement
 public void addElement(Child a)
Add child.

Overrides:
addElement in class Parent
 o getDTD
 public DTD getDTD()
Return DTD instance.

Returns:
null when there is no DTD.
 o getRootElement
 public Element getRootElement()
Note: getRootElement() is deprecated. Use getDocumentElement()

Return root Element.

Returns:
null if this has not set Element yet.
 o print
 public void print(PrintWriter pw)
Print the document to specified stream in XML format.

 o print
 public void print(PrintWriter pw,
                   String enc,
                   int indent)
Print the document to specified stream in XML format.

Parameters:
indent - ignored.
Overrides:
print in class Child
 o print
 public void print(PrintWriter pw,
                   String enc)
Print the document to specified stream in XML format.

 o setPrintInternalDTD
 public void setPrintInternalDTD(boolean f)
Set if print() method prints internal DTD.

 o getText
 public String getText()
Print all text included in this element.

Overrides:
getText in class Child

All Packages  Class Hierarchy  This Package  Previous  Next  Index