|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.xml.parser.v2.XMLNode
oracle.xml.parser.v2.XMLNSNode
oracle.xml.parser.v2.XMLElement
oracle.xml.parser.v2.XMLDocument
This class implements the DOM Document interface, represents an entire XML document and serves the root of the Document Object Model tree. Each XML tag can either represent a node or a leaf of this tree.
According to the XML specification, the root of the tree consists of any combination of comments and processing instructions, but only one root element. A helper method getDocumentElement
is provided as a short cut to finding the root element.
Field Summary | |
static java.lang.String |
THICK |
static java.lang.String |
THIN |
Fields inherited from class oracle.xml.parser.v2.XMLElement |
ANY_CONTENTTYPE, ELEMENTS_CONTENTTYPE, EMPTY_CONTENTTYPE, MIXED_CONTENTTYPE |
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 |
Fields inherited from interface org.w3c.dom.validation.NodeEditVAL |
VAL_FALSE, VAL_INCOMPLETE, VAL_NS_WF, VAL_SCHEMA, VAL_TRUE, VAL_UNKNOWN, VAL_WF |
Fields inherited from interface org.w3c.dom.validation.ElementEditVAL |
VAL_ANY_CONTENTTYPE, VAL_ELEMENTS_CONTENTTYPE, VAL_EMPTY_CONTENTTYPE, VAL_MIXED_CONTENTTYPE, VAL_SIMPLE_CONTENTTYPE |
Constructor Summary | |
XMLDocument() Creates an empty document. |
Method Summary | |
void |
addID(java.lang.String name, XMLElement e) Add a ID Element associated with this document |
Node |
adoptNode(Node srcNodeArg) Adopts a node from another document to this document. |
Node |
appendChild(Node elem) Appends a new node to the document |
short |
canAppendChild(Node newChild) Determines whether the Node.appendChild operation would make this document not compliant with the VAL_INCOMPLETE validity type. |
short |
canInsertBefore(Node newChild, Node refChild) Determines whether the Node.insertBefore operation would make this document not compliant with the VAL_INCOMPLETE validity type. |
short |
canRemoveChild(Node oldChild) Determines whether the Node.removeChild operation would make this document not compliant with the VAL_INCOMPLETE validity type. |
short |
canReplaceChild(Node newChild, Node oldChild) Determines whether the Node.replaceChild operation would make this document not compliant with the VAL_INCOMPLETE validity type. |
Attr |
createAttribute(java.lang.String name) Creates an Attr of the given name. |
Attr |
createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName) Creates an attribute with the given qualified name and namespace URI. |
CDATASection |
createCDATASection(java.lang.String data) Creates a CDATASection node whose value is the specified string. |
Comment |
createComment(java.lang.String data) Creates a Comment node given the specified string. |
DocumentFragment |
createDocumentFragment() Creates an empty DocumentFragment object. |
Element |
createElement(java.lang.String tagName) Creates an element of the type specified. |
Element |
createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName) Creates an element of the given qualified name and namespace URI. |
EntityReference |
createEntityReference(java.lang.String name) Creates an EntityReference object. |
Event |
createEvent(java.lang.String type) Creates an event object of the specified type |
MutationEvent |
createMutationEvent(java.lang.String type) Creates a Mutation Event object of specified type |
protected XMLNode |
createNodeFromType(short type, java.lang.String namespace, java.lang.String qname) Subclass of XMLDocument should override this method to create custom DOM nodes. |
NodeIterator |
createNodeIterator(Node root, int whatToShow, NodeFilter filter, boolean expandEntityReferences) Creates a Node Iterator with specified root,flag which governs what type of nodes it should include in logical view, filter for filtering nodes, flag determining whether entity references and its descendants could be included |
ProcessingInstruction |
createProcessingInstruction(java.lang.String target, java.lang.String data) Creates a ProcessingInstruction node given the specified name and data strings. |
Range |
createRange() Create a new Document Range Object ,with Start and End Boundary points at the begining of the document. |
Event |
createRangeEvent(java.lang.String type) Creates a Range Event object of specified type |
Text |
createTextNode(java.lang.String data) Creates a Text node given the specified string. |
Event |
createTraversalEvent(java.lang.String type) Creates a Traversal Event object of specified type |
TreeWalker |
createTreeWalker(Node root, int whatToShow, NodeFilter filter, boolean expandEntityReferences) Creates a Node Iterator with specified root,flag which governs what type of nodes it should include in logical view, filter for filtering nodes, flag determining whether entity references and its descendants could be included |
java.util.Vector |
expectedElements(Element e) Returns vector of element names that can be appended to the element. |
NamedNodeMap |
getAttributes() A NamedNodeMap containing the attributes of this node (if it is an Element ) or null otherwise. |
int |
getColumnNumber() Get column number debug information |
boolean |
getContinuousValidityChecking() An attribute specifying whether the validity of the document is continuously enforced. |
boolean |
getDebugMode() Get the debug flag |
NameList |
getDefinedElements(java.lang.String namespaceURI) Returns list of all element information item names of global declaration, belonging to the specified namespace. |
DocumentType |
getDoctype() The Document Type Declaration (DTD) associated with this document. |
Element |
getDocumentElement() This is a convenience attribute that allows direct access to the child node that is the root element of the document. |
Element |
getElementById(java.lang.String elementId) Returns the Element whose ID is given by elementId. |
NodeList |
getElementsByTagName(java.lang.String tagname) Returns a NodeList of all the Element s with a given tag name in the order in which they would be encountered in a preorder traversal of the Document tree. |
NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName) Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they are encountered in a preorder traversal of the Document tree. |
java.lang.String |
getEncoding() Retrieves the character encoding information. |
XMLElement |
getIDElement(java.lang.String idValue) Deprecated. As of DOM 2 |
java.util.Hashtable |
getIDHashtable() Get the ID element hashtable in the XML DOM Tree |
DOMImplementation |
getImplementation() The DOMImplementation object that handles this document. |
int |
getLineNumber() Get line number debug information |
java.lang.String |
getLocalName() Gets the local Name for this element. |
java.lang.String |
getNamespaceURI() The namespace URI of this node, or null if it is unspecified. |
Node |
getNextSibling() Gets The node immediately following this node. |
java.lang.String |
getNodeName() Gets a name of the node |
short |
getNodeType() Gets a code representing the type of the underlying object |
Document |
getOwnerDocument() The Document object associated with this node. |
Node |
getParentNode() Gets the parent of this node. |
Node |
getPreviousSibling() Gets the node immediately preceding this node. |
QxName |
getQName() Gets the QName of this node |
XMLSchema |
getSchema() return the validator |
java.lang.String |
getStandalone() Retrieves the standalone information. |
java.lang.String |
getSystemId() Get the system id of the entity contain this node |
java.lang.String |
getText() Returns the non-marked-up text contained by this element. |
java.lang.String |
getVersion() Retrieves the version information. |
Node |
importNode(Node importedNode, boolean deep) Imports a node from another document to this document. |
Node |
insertBefore(Node newChild, Node refChild) Inserts the node newChild before the existing child node refChild . |
short |
nodeValidity(short wFValidityCheckLevel) Determines if the node is valid relative to the validation type specified in valType . |
void |
print(java.io.OutputStream out) Writes the contents of this document to the given output stream. |
void |
print(java.io.OutputStream out, java.lang.String enc) Writes the contents of this document to the given output stream. |
void |
print(PrintDriver pd) Writes the contents of this document to the given output stream. |
void |
print(java.io.PrintWriter out) Writes the contents of this document to the given output stream. |
void |
print(java.io.Writer out) Writes the contents of this document to the given output stream. |
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) This method reads the information written in the compressed stream by writeExternal method and restores the object correspondingly. |
Node |
removeChild(Node elem) removes the elem from this documents list of child nodes |
Node |
replaceChild(Node newChild, Node oldChild) Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. |
void |
reportSAXEvents(ContentHandler cntHandler) Report SAX Events from a DOM Tree |
void |
setContinuousValidityChecking(boolean continuousValidityChecking) An attribute specifying whether the validity of the document is continuously enforced. |
void |
setDoctype(java.lang.String rootname, java.lang.String sysid, java.lang.String pubid) Sets the doctype URI for the document |
void |
setEncoding(java.lang.String encoding) Sets the character encoding for output. |
void |
setLocale(java.util.Locale locale) Sets the locale for error reporting |
void |
setParsedDoctype(java.lang.String rootname, java.lang.String sysid, java.lang.String pubid) Sets the doctype object by parsing sysid |
void |
setSchema(XMLSchema schema) set the XML Schema |
void |
setStandalone(java.lang.String value) Sets the standalone information stored in the <? |
void |
setVersion(java.lang.String version) Sets the version number stored in the <? |
short |
validateDocument() Validates the document against the schema, e.g., a DTD or an XML Schema or another. |
boolean |
validateElementContent(Element e) Validates the content of a element node. |
void |
writeExternal(java.io.ObjectOutput outArg) This method saves the state of the object by creating a binary compressed stream with information about this object. |
Methods inherited from class oracle.xml.parser.v2.XMLNSNode |
addText, addText, getChildNodes, getFirstChild, getLastChild |
Methods inherited from class oracle.xml.parser.v2.XMLNode |
addEventListener, cloneNode, dispatchEvent, equals, getNodeValue, getPrimitiveTypeId, getProperty, getSchemaTypeName, getXMLError, hasChildNodes, hashCode, isDocumentFlag, isNodeFlag, isSupported, removeEventListener, resetNodeFlag, selectNodes, selectNodes, selectSingleNode, selectSingleNode, setDebugInfo, setNodeFlag, setNodeFlag, setNodeFlag, setNodeValue, setProperty, transformNode, valueOf, valueOf, xdbGetNodeId |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
cloneNode, getChildNodes, getFirstChild, getLastChild, getNodeValue, getPrefix, hasAttributes, hasChildNodes, isSupported, normalize, setNodeValue, setPrefix |
Methods inherited from interface org.w3c.dom.validation.DocumentEditVAL |
setContinuousValidityChecking |
Methods inherited from interface org.w3c.dom.validation.NodeEditVAL |
getDefaultValue, getEnumeratedValues |
Methods inherited from interface org.w3c.dom.events.EventTarget |
addEventListener, dispatchEvent, removeEventListener |
Methods inherited from interface oracle.xml.util.NSName |
getNamespace |
Methods inherited from interface org.w3c.dom.validation.ElementEditVAL |
getAllowedFirstChildElements |
Field Detail |
public static final java.lang.String THICK
public static final java.lang.String THIN
Constructor Detail |
public XMLDocument()
Method Detail |
public DocumentType getDoctype()
null
. Note that the DOM Level 1 specification does not support editing the DTD.getDoctype
in interface Document
DocumentType
public short getNodeType()
getNodeType
in interface Node
getNodeType
in class XMLElement
public QxName getQName()
getQName
in class XMLElement
public java.lang.String getNodeName()
getNodeName
in interface Node
getNodeName
in class XMLElement
public Node getParentNode()
Document
, DocumentFragment
, and Attr
may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is null
.getParentNode
in interface Node
getParentNode
in class XMLNode
public DOMImplementation getImplementation()
DOMImplementation
object that handles this document. A DOM application may use objects from multiple implementations.getImplementation
in interface Document
public java.lang.String getNamespaceURI()
Node
null
if it is unspecified.ELEMENT_NODE
and ATTRIBUTE_NODE
and nodes created with a DOM Level 1 method, such as createElement
from the Document
interface, this is always null
.Per the Namespaces in XML Specification an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace.getNamespaceURI
in interface Node
getNamespaceURI
in class XMLElement
public java.lang.String getLocalName()
getLocalName
in interface Node
getLocalName
in class XMLElement
public Node getPreviousSibling()
null
.getPreviousSibling
in interface Node
getPreviousSibling
in class XMLNode
public Node getNextSibling()
null
.getNextSibling
in interface Node
getNextSibling
in class XMLNode
public NamedNodeMap getAttributes()
Node
NamedNodeMap
containing the attributes of this node (if it is an Element
) or null
otherwise.getAttributes
in interface Node
getAttributes
in class XMLElement
public Element getDocumentElement()
getDocumentElement
in interface Document
public Document getOwnerDocument()
Document
object associated with this node. Since this node is a Document
this is null
.getOwnerDocument
in interface Node
getOwnerDocument
in class XMLNode
null
public Element createElement(java.lang.String tagName) throws DOMException
createElement
in interface Document
tagName
- The name of the element type to instantiate. The name is treated as case-sensitive.Element
object.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.public DocumentFragment createDocumentFragment()
DocumentFragment
object.createDocumentFragment
in interface Document
DocumentFragment
.public Text createTextNode(java.lang.String data)
Text
node given the specified string.createTextNode
in interface Document
data
- The data for the node.Text
object.public Comment createComment(java.lang.String data)
Comment
node given the specified string.createComment
in interface Document
data
- The data for the node.Comment
object.public CDATASection createCDATASection(java.lang.String data) throws DOMException
CDATASection
node whose value is the specified string.createCDATASection
in interface Document
data
- The data for the CDATASection
contents.CDATASection
object.DOMException
- A DOMException
could be thrown.public ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data) throws DOMException
ProcessingInstruction
node given the specified name and data strings.createProcessingInstruction
in interface Document
target
- The target part of the processing instruction.data
- The data for the node.ProcessingInstruction
object.DOMException
- INVALID_CHARACTER_ERR: Raised if an invalid character is specified.public Attr createAttribute(java.lang.String name) throws DOMException
Attr
of the given name. Note that the Attr
instance can then be set on an Element
using the setAttribute
method.createAttribute
in interface Document
name
- The name of the attribute.Attr
object.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.public EntityReference createEntityReference(java.lang.String name) throws DOMException
createEntityReference
in interface Document
name
- The name of the entity to reference.EntityReference
object.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an invalid character.public NodeList getElementsByTagName(java.lang.String tagname)
NodeList
of all the Element
s with a given tag name in the order in which they would be encountered in a preorder traversal of the Document
tree.getElementsByTagName
in interface Document
getElementsByTagName
in class XMLElement
tagname
- The name of the tag to match on. The special value "*" matches all tags.NodeList
object containing all the matched Element
s.public Node appendChild(Node elem) throws DOMException
appendChild
in interface Node
appendChild
in class XMLNSNode
elem
- the new node to be addedDOMException
- HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the elem
node.elem
was created from a different document than this one.public Node replaceChild(Node newChild, Node oldChild) throws DOMException
oldChild
with newChild
in the list of children, and returns the oldChild
node. If the newChild
is already in the tree, it is first removed. This is an override of the XMLNode.removeChild
methodreplaceChild
in interface Node
replaceChild
in class XMLNSNode
newChild
- The new node to put in the child list.oldChild
- The node being replaced in the list.DOMException
- HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild
node.newChild
was created from a different document than this one.oldChild
is not a child of this node.public Node removeChild(Node elem) throws DOMException
removeChild
in interface Node
removeChild
in class XMLNSNode
elem
- the node to be removedDOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this document is readonly.oldChild
is not a child of this node.public Node insertBefore(Node newChild, Node refChild) throws DOMException
newChild
before the existing child node refChild
. If refChild
is null
, insert newChild
at the end of the list of children.newChild
is a DocumentFragment
object, all of its children are inserted, in the same order, before refChild
. If the newChild
is already in the tree, it is first removed.insertBefore
in interface Node
insertBefore
in class XMLNSNode
newChild
- The node to insert.refChild
- The reference node, i.e., the node before which the new node must be inserted.DOMException
- HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not allow children of the type of the newChild
node, or if the node to insert is one of this node's ancestors.newChild
was created from a different document than the one that created this node.refChild
is not a child of this node.public void setParsedDoctype(java.lang.String rootname, java.lang.String sysid, java.lang.String pubid) throws DOMException
rootname
- The name of the root elementsysid
- The system id of the doctypepubid
- The public id of the doctype (can be null)DOMException
public void setDoctype(java.lang.String rootname, java.lang.String sysid, java.lang.String pubid)
sysid
- The system id of the doctypepubid
- The public id of the doctype (can be null)public void addID(java.lang.String name, XMLElement e)
name
- String - id valuee
- XMLElement associated with idpublic XMLElement getIDElement(java.lang.String idValue)
Get the element in the XML DOM Tree with a given ID
public java.util.Hashtable getIDHashtable()
public java.lang.String getText()
XMLDocument.getText
returns "William Shakespeare".
getText
in class XMLNSNode
public void print(java.io.PrintWriter out) throws java.io.IOException
print
in class XMLNode
out
- PrintWriter
to write tojava.io.IOException
- if an error occurspublic void print(java.io.Writer out) throws java.io.IOException
print
in class XMLNode
out
- Writer
to write tojava.io.IOException
- if an error occurspublic void print(java.io.OutputStream out) throws java.io.IOException
print
in class XMLNode
out
- OutputStream
to write tojava.io.IOException
- if an error occurspublic void print(java.io.OutputStream out, java.lang.String enc) throws java.io.IOException
print
in class XMLNode
out
- OutputStream
to write toenc
- Encoding to use for the outputjava.io.IOException
- if an invalid encoding was specified or if any other error occurspublic void print(PrintDriver pd) throws java.io.IOException
pd
- PrintDriver
used to write each nodejava.io.IOException
- if an error occurspublic void printExternalDTD(java.io.PrintWriter out) throws java.io.IOException
out
- PrintWriter
to write tojava.io.IOException
- if an error occurspublic void printExternalDTD(java.io.OutputStream out) throws java.io.IOException
out
- OutputStream
to write tojava.io.IOException
- if an error occurspublic void printExternalDTD(java.io.OutputStream out, java.lang.String enc) throws java.io.IOException
out
- OutputStream
to write toenc
- Encoding to use for the outputjava.io.IOException
- if an invalid encoding was specified or if any other error occurspublic void reportSAXEvents(ContentHandler cntHandler) throws SAXException
reportSAXEvents
in class XMLElement
cntHandler
- ContentHandlerSAXException
- thrown by SAX Callback functionspublic boolean validateElementContent(Element e)
e
- Element to be validatedpublic final void setLocale(java.util.Locale locale)
locale
- Locale for error reporting.public java.util.Vector expectedElements(Element e)
e
- Elementpublic java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- The version information to set.public java.lang.String getEncoding()
public void setEncoding(java.lang.String encoding)
encoding
- The character encoding to setpublic final java.lang.String getStandalone()
public void setStandalone(java.lang.String value)
value
- The attribute value ('yes' or 'no').public boolean getDebugMode()
getDebugMode
in class XMLNode
public int getLineNumber()
getLineNumber
in class XMLNode
public int getColumnNumber()
getColumnNumber
in class XMLNode
public java.lang.String getSystemId()
getSystemId
in class XMLNode
public Node adoptNode(Node srcNodeArg) throws DOMException
srcNodeArg
- Node to be adoptedDOMException
- NOT_SUPPORTED_ERR: Raised if the type of the node being adopted is not supported.public Node importNode(Node importedNode, boolean deep) throws DOMException
importNode
in interface Document
importedNode
- Node to be importeddeep
- boolean variable indicating whether the descendants of this node are to be importedDOMException
- NOT_SUPPORTED_ERR: Raised if the type of the node being imported is not supported.public Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException
createElementNS
in interface Document
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name contains illegal Characters NAMESPACE_ERR : Raised if the qualified name is malformed, if the qualified name has a prefix and the namespace URI is null or an empty string,or if the qulaifiedName has a prefix that is "xml" and namespace URI is different from "http://www.w3.org/XML/1998/namespace"public Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException
createAttributeNS
in interface Document
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name contains illegal Characters NAMESPACE_ERR : Raised if the qualified name is malformed, if the qualified name has a prefix and the namespace URI is null or an empty string,or if the qulaifiedName has a prefix that is "xml" and namespace URI is different from "http://www.w3.org/2000/xmlns/"public NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
getElementsByTagNameNS
in interface Document
getElementsByTagNameNS
in class XMLElement
namespaceURI
- the namespace of the elementlocalName
- the local name of the elementpublic Element getElementById(java.lang.String elementId)
getElementById
in interface Document
elementId
- String used to get the matching Id Elementpublic NodeIterator createNodeIterator(Node root, int whatToShow, NodeFilter filter, boolean expandEntityReferences) throws DOMException
createNodeIterator
in interface DocumentTraversal
root
- root node of the iteratorwhatToShow
- flag indicating what type of nodes will be includedfilter
- NodeFilter to filter unwanted nodes from iteratorexpandEntityReferences
- flag to indicate traversal of entity referencesDOMException
- NOT_SUPPORTED_ERR: if the NodeIterator could not be created with specified rootpublic TreeWalker createTreeWalker(Node root, int whatToShow, NodeFilter filter, boolean expandEntityReferences) throws DOMException
createTreeWalker
in interface DocumentTraversal
root
- root node of the treewalkerwhatToShow
- flag indicating what type of nodes will be includedfilter
- NodeFilter to filter unwanted nodes from treewalkerexpandEntityReferences
- flag to indicate traversal of entity referencesDOMException
- NOT_SUPPORTED_ERR: if the TreeWalker could not be created with specified rootpublic Range createRange()
public Event createEvent(java.lang.String type)
createEvent
in interface DocumentEvent
type
- the type of the eventpublic MutationEvent createMutationEvent(java.lang.String type)
type
- the type of the mutation eventpublic Event createRangeEvent(java.lang.String type)
type
- the type of the eventpublic Event createTraversalEvent(java.lang.String type)
type
- the type of the eventpublic void setSchema(XMLSchema schema)
schema
- to be setpublic XMLSchema getSchema()
XMLSchema
public boolean getContinuousValidityChecking()
true
, the implementation may raise certain exceptions, depending on the situation (see the following). This attribute is false
by default.getContinuousValidityChecking
in interface DocumentEditVAL
public void setContinuousValidityChecking(boolean continuousValidityChecking) throws DOMException, ExceptionVAL
true
, the implementation may raise certain exceptions, depending on the situation (see the following). This attribute is false
by default.DOMException
- NOT_SUPPORTED_ERR: Raised if the implementation does not support setting this attribute to true
.ExceptionVAL
- NO_SCHEMA_AVAILABLE_ERR: Raised if this attribute is set to true
and a schema is unavailable.DOMException
- VALIDATION_ERR: Raised if an operation makes this document not compliant with the VAL_INCOMPLETE
validity type or the document is invalid, and this attribute is set to true
.public NameList getDefinedElements(java.lang.String namespaceURI)
getDefinedElements
in interface DocumentEditVAL
namespaceURI
- namespaceURI
of namespace. For DTDs, this is null
.null
if no schema is available.public short validateDocument()
DOMConfiguration
interface, with all errors being SEVERITY_ERROR
as defined in the DOMError
interface.validateDocument
in interface DocumentEditVAL
public short nodeValidity(short wFValidityCheckLevel)
valType
. This operation doesn't normalize before checking if it is valid. To do so, one would need to explicitly call a normalize method. The difference between this method and the validateDocument
method on the DocumentVAL
interface is that validateDocument
only checks to determine whether the entire document is valid.nodeValidity
in interface NodeEditVAL
nodeValidity
in class XMLElement
wFValidityCheckLevel
- Flag to tell at what level validity and well-formedness checking is done.public short canInsertBefore(Node newChild, Node refChild)
Node.insertBefore
operation would make this document not compliant with the VAL_INCOMPLETE
validity type.canInsertBefore
in interface NodeEditVAL
canInsertBefore
in class XMLElement
newChild
- Node
to be inserted.refChild
- Reference Node
.public short canRemoveChild(Node oldChild)
Node.removeChild
operation would make this document not compliant with the VAL_INCOMPLETE
validity type.canRemoveChild
in interface NodeEditVAL
canRemoveChild
in class XMLElement
oldChild
- Node
to be removed.public short canReplaceChild(Node newChild, Node oldChild)
Node.replaceChild
operation would make this document not compliant with the VAL_INCOMPLETE
validity type.canReplaceChild
in interface NodeEditVAL
canReplaceChild
in class XMLElement
newChild
- New Node
.oldChild
- Node
to be replaced.public short canAppendChild(Node newChild)
Node.appendChild
operation would make this document not compliant with the VAL_INCOMPLETE
validity type.canAppendChild
in interface NodeEditVAL
canAppendChild
in class XMLElement
newChild
- Node
to be appended.public void writeExternal(java.io.ObjectOutput outArg) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
writeExternal
in class XMLElement
outArg
- The ObjectOutput stream used to write the serialized/ compressed stream.java.io.IOException
- is thrown when there is an exception while writing the serialized/compressed stream.public void readExternal(java.io.ObjectInput inArg) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
readExternal
in class XMLElement
inArg
- the ObjectInput stream used for reading the compressed streamjava.io.IOException
- is thrown when there is an error in reading the input stream.java.lang.ClassNotFoundException
- is thrown when the class is not foundprotected XMLNode createNodeFromType(short type, java.lang.String namespace, java.lang.String qname)
type
- - node type to create.namespace
- - namespace of element or attribute nodeqname
- - qname of element or attribute node.
|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |