|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.xml.parser.v2.XMLNode | +--oracle.xml.parser.v2.DTD
Implements the DOM DocumentType interface and holds the Document Type Definition information for an XML document.
Fields inherited from interface oracle.xml.comp.CXMLConstants |
ATTR_DEF,
ATTR_TOKEN,
ATTRDECL_DEF,
CDATA_DEF,
CHAR_DEF,
COMMENT_DEF,
CXML_VERSION,
cXMLFILE,
cXMLFILE_LEN,
DEBUG,
DTD_DEF,
ELEMENTDECL_DEF,
END,
ENTITY_DEF,
ENTITYREF_DEF,
META_ID_MAX,
names,
NOTATION_DEF,
NS_DEF,
NULLSTR,
PI_DEF,
PREFIX_DEF,
TAG_DEF,
TAG_TOKEN,
TOKEN_ONLY,
XMLDECL_DEF |
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE,
CDATA_SECTION_NODE,
COMMENT_NODE,
DOCUMENT_FRAGMENT_NODE,
DOCUMENT_NODE,
DOCUMENT_TYPE_NODE,
ELEMENT_NODE,
ENTITY_NODE,
ENTITY_REFERENCE_NODE,
NOTATION_NODE,
PROCESSING_INSTRUCTION_NODE,
TEXT_NODE |
Constructor Summary |
DTD()
Default constructor. |
Method Summary |
Type | Method |
---|---|
ElementDecl |
findElementDecl(java.lang.String name)
Finds an element declaration for the given tag name. |
Entity |
findEntity(java.lang.String n,
boolean par)
Finds a named entity in the DTD. |
Notation |
findNotation(java.lang.String name)
Retrieves the named notation from the DTD. |
NodeList |
getChildNodes()
A NodeList that contains all children of this node. |
NamedNodeMap |
getElementDecls()
A NamedNodeMap containing the element declarations
in the DTD. |
NamedNodeMap |
getEntities()
A NamedNodeMap containing the general entities, both
external and internal, declared in the DTD. |
java.lang.String |
getInternalSubset()
The internal subset as a string.The actual content returned depends on how much information is available to the implementation. |
java.lang.String |
getName()
Gets the name of the DTD; i.e., the name immediately following the DOCTYPE keyword. |
java.lang.String |
getNodeName()
Gets the name of the DTD; i.e., the name immediately following the DOCTYPE keyword. |
short |
getNodeType()
Gets a code representing the type of the underlying object |
NamedNodeMap |
getNotations()
A NamedNodeMap containing the notations declared in the
DTD. |
XMLDOMImplementation |
getOwnerImplementation()
|
java.lang.String |
getPublicId()
Gets The public identifier associated with the DTD, if specified. |
java.lang.String |
getRootTag()
Get the root tag for the DTD |
java.lang.String |
getSystemId()
Gets the system identifier associated with the DTD, if specified. |
boolean |
hasChildNodes()
This is a convenience method to allow easy determination of whether a node has any children. |
void |
normalize()
Puts all Text nodes in the full depth of the sub-tree
underneath this Node , including attribute nodes, into a
"normal" form where only structure (e.g., elements, comments,
processing instructions, CDATA sections, and entity references)
separates Text nodes, i.e., there are neither adjacent
Text nodes nor empty Text nodes. |
void |
printExternalDTD(java.io.OutputStream out)
Writes the contents of this document to the given output stream. |
void |
printExternalDTD(java.io.OutputStream out,
java.lang.String enc)
Writes the contents of the external DTD to the given output stream. |
void |
printExternalDTD(java.io.PrintWriter out)
Writes the contents of this document to the given output stream. |
void |
readExternal(java.io.ObjectInput inArg)
Input Pointer (First byte expected) : DTD_DEF (byte) Output Pointer (Last byte read) : Last child node |
void |
readExternal(oracle.xml.io.XMLObjectInput in,
oracle.xml.comp.CXMLContext cxmlContext)
This method reads the DTD content. |
void |
setRootTag(java.lang.String root)
Set the root tag for the DTD |
void |
writeExternal(java.io.ObjectOutput outArg)
This method saves the state of the object by creating a binray compressed stream with information about this object. |
void |
writeExternal(oracle.xml.io.XMLObjectOutput out,
oracle.xml.comp.CXMLContext cxmlContext)
This method saves the state of the object by creating a binray compressed stream with information about this object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public DTD()
Method Detail |
public void setRootTag(java.lang.String root)
root
- the root tagpublic java.lang.String getRootTag()
public java.lang.String getName()
DOCTYPE
keyword.public java.lang.String getNodeName()
DOCTYPE
keyword.public short getNodeType()
public NamedNodeMap getEntities()
NamedNodeMap
containing the general entities, both
external and internal, declared in the DTD. Duplicates are discarded.
For example in:<!DOCTYPE ex SYSTEM "ex.dtd" [ <!ENTITY foo
"foo"> <!ENTITY bar "bar"> <!ENTITY % baz "baz">]>
<ex/> the interface provides access to foo
and
bar
but not baz
. Every node in this map also
implements the Entity
interface.
entities
cannot be altered in any way.public NamedNodeMap getNotations()
NamedNodeMap
containing the notations declared in the
DTD. Duplicates are discarded. Every node in this map also implements
the Notation
interface.
notations
cannot be altered in any way.public NamedNodeMap getElementDecls()
NamedNodeMap
containing the element declarations
in the DTD. Every node in this map is an ElementDecl
object.elementdecls
cannot be altered in any way.public boolean hasChildNodes()
false
as DTD node can not have any children,public NodeList getChildNodes()
NodeList
that contains all children of this node. If
there are no children, this is a NodeList
containing no
nodes. The content of the returned NodeList
is "live" in
the sense that, for instance, changes to the children of the node
object that it was created from are immediately reflected in the nodes
returned by the NodeList
accessors; it is not a static
snapshot of the content of the node. This is true for every
NodeList
, including the ones returned by the
getElementsByTagName
method.public final Entity findEntity(java.lang.String n, boolean par)
n
- The name of the entity.Entity
object; returns null if it
is not found.public final ElementDecl findElementDecl(java.lang.String name)
name
- The tag name.public final Notation findNotation(java.lang.String name)
name
- The name of the notation.Notation
object; returns null if it is not
found.public java.lang.String getPublicId()
null
.public java.lang.String getSystemId()
null
.public void printExternalDTD(java.io.PrintWriter out) throws java.io.IOException
out
- PrintWriter
to write topublic void printExternalDTD(java.io.OutputStream out) throws java.io.IOException
out
- OutputStream
to write topublic void printExternalDTD(java.io.OutputStream out, java.lang.String enc) throws java.io.IOException
out
- OutputStream
to write toenc
- Encoding to use for the outputpublic java.lang.String getInternalSubset()
public XMLDOMImplementation getOwnerImplementation()
public void normalize()
Text
nodes in the full depth of the sub-tree
underneath this Node
, including attribute nodes, into a
"normal" form where only structure (e.g., elements, comments,
processing instructions, CDATA sections, and entity references)
separates Text
nodes, i.e., there are neither adjacent
Text
nodes nor empty Text
nodes. This can
be used to ensure that the DOM view of a document is the same as if
it were saved and re-loaded, and is useful when operations (such as
XPointer lookups) that depend on a particular document tree
structure are to be used.In cases where the document contains
CDATASections
, the normalize operation alone may not be
sufficient, since XPointers do not differentiate between
Text
nodes and CDATASection
nodes.public void writeExternal(java.io.ObjectOutput outArg) throws java.io.IOException
out
- The ObjectOutput stream used to write the serialized/
compressed stream.public void writeExternal(oracle.xml.io.XMLObjectOutput out, oracle.xml.comp.CXMLContext cxmlContext) throws java.io.IOException
out
- The ObjectOutput stream used to write the serialized/
compressed stream.cxmlContext
- The context of the compressed output streampublic void readExternal(java.io.ObjectInput inArg) throws java.io.IOException, java.lang.ClassNotFoundException
public void readExternal(oracle.xml.io.XMLObjectInput in, oracle.xml.comp.CXMLContext cxmlContext) throws java.io.IOException, java.lang.ClassNotFoundException
in
- XMLObjectInput the input streamcxmlContent
- the serialization object content information
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |