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
-
TXDocument()
-
-
addElement(Child)
- Add child.
-
clone()
- Clone this instance including children.
-
getDocumentElement()
- [DOM] Return a root element.
-
getDocumentType()
- [DOM]
-
getDTD()
- Return DTD instance.
-
getEncoding()
- Return encoding name.
-
getNodeType()
- [DOM] Return
Node.NodeType.DOCUMENT
-
getRootElement()
- Return root Element.
Deprecated.
-
getRootName()
- Return a name of root element in the document, not in DTD.
-
getStandalone()
- Return "yes" or "no".
-
getText()
- Print all text included in this element.
-
getVersion()
- Return XML version of the document.
-
insert(Child, int)
- Insert a Child instance into specified position.
-
isApplySyntax()
- Return boolean if processor checks syntax.
-
print(PrintWriter)
- Print the document to specified stream in XML format.
-
print(PrintWriter, String)
- Print the document to specified stream in XML format.
-
print(PrintWriter, String, int)
- Print the document to specified stream in XML format.
-
setDocumentElement(Element)
- [DOM] Set a root element.
-
setDocumentType(Node)
- [DOM]
-
setEncoding(String)
- Set encoding of the document.
-
setPrintInternalDTD(boolean)
- Set if
print()
method prints internal DTD.
-
setStandalone(String)
- Set `standalone' value.
-
setVersion(String)
- Set XML version.
TXDocument
public TXDocument()
getNodeType
public int getNodeType()
- [DOM] Return
Node.NodeType.DOCUMENT
- Overrides:
- getNodeType in class Child
setDocumentType
public void setDocumentType(Node documentType)
- [DOM]
getDocumentType
public Node getDocumentType()
- [DOM]
setDocumentElement
public void setDocumentElement(Element documentElement)
- [DOM] Set a root element.
getDocumentElement
public Element getDocumentElement()
- [DOM] Return a root element.
clone
public synchronized Object clone()
- Clone this instance including children.
- Overrides:
- clone in class Child
setStandalone
public void setStandalone(String rv)
- Set `standalone' value.
getStandalone
public String getStandalone()
- Return "yes" or "no".
setVersion
public void setVersion(String v)
- Set XML version. i.e. "1.0"
getVersion
public String getVersion()
- Return XML version of the document.
- Returns:
- null if the document has no `
<?xml ...>
'
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
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.
isApplySyntax
public boolean isApplySyntax()
- Return boolean if processor checks syntax.
- Returns:
- true when `standalone' value isn't "no"
getRootName
public String getRootName()
- Return a name of root element in the document, not in DTD.
insert
public void insert(Child ch,
int ind)
- Insert a Child instance into specified position.
- Overrides:
- insert in class Parent
addElement
public void addElement(Child a)
- Add child.
- Overrides:
- addElement in class Parent
getDTD
public DTD getDTD()
- Return DTD instance.
- Returns:
- null when there is no DTD.
getRootElement
public Element getRootElement()
- Note: getRootElement() is deprecated.
Use getDocumentElement()
- Return root Element.
- Returns:
- null if this has not set Element yet.
print
public void print(PrintWriter pw)
- Print the document to specified stream in XML format.
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
print
public void print(PrintWriter pw,
String enc)
- Print the document to specified stream in XML format.
setPrintInternalDTD
public void setPrintInternalDTD(boolean f)
- Set if
print()
method prints internal DTD.
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