Java Doc for CoreDocumentImpl.java in  » Web-Server » Rimfaxe-Web-Server » org » apache » xerces » dom » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Server » Rimfaxe Web Server » org.apache.xerces.dom 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xerces.dom.NodeImpl
      org.apache.xerces.dom.ChildNode
         org.apache.xerces.dom.ParentNode
            org.apache.xerces.dom.CoreDocumentImpl

All known Subclasses:   org.apache.xerces.dom.DocumentImpl,
CoreDocumentImpl
public class CoreDocumentImpl extends ParentNode implements Document(Code)
The Document interface represents the entire HTML or XML document. Conceptually, it is the root of the document tree, and provides the primary access to the document's data.

Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a ownerDocument attribute which associates them with the Document within whose context they were created.

The CoreDocumentImpl class only implements the DOM Core. Additional modules are supported by the more complete DocumentImpl subclass.

Note: When any node in the document is serialized, the entire document is serialized along with it.
author:
   Arnaud Le Hors, IBM
author:
   Joe Kesselman, IBM
author:
   Andy Clark, IBM
author:
   Ralf Pfeiffer, IBM
since:
   PR-DOM-Level-1-19980818.



Field Summary
protected  booleanallowGrammarAccess
     Allow grammar access.
protected  intchanges
     Number of alterations made to this document since its creation. Serves as a "dirty bit" so that live objects such as NodeList can recognize when an alteration has been made and discard its cached state information.

Any method that alters the tree structure MUST cause or be accompanied by a call to changed(), to inform it that any outstanding NodeLists may have to be updated.

(Required because NodeList is simultaneously "live" and integer- indexed -- a bad decision in the DOM's design.)

Note that changes which do not affect the tree's structure -- changing the node's name, for example -- do _not_ have to call changed().

Alternative implementation would be to use a cryptographic Digest value rather than a count.

protected  ElementImpldocElement
     Document element.
protected  DocumentTypeImpldocType
     Document type.
protected  Stringencoding
    
protected  booleanerrorChecking
     Bypass error checking.
protected  Hashtableidentifiers
     Identifiers.
protected static  int[]kidOK
     Table for quick check of child insertion.
final static  longserialVersionUID
     Serialization version.
protected  booleanstandalone
    
protected  Stringversion
    

Constructor Summary
public  CoreDocumentImpl()
     NON-DOM: Actually creating a Document is outside the DOM's spec, since it has to operate in terms of a particular implementation.
public  CoreDocumentImpl(boolean grammarAccess)
     Constructor.
public  CoreDocumentImpl(DocumentType doctype)
     For DOM2 support.
public  CoreDocumentImpl(DocumentType doctype, boolean grammarAccess)
     For DOM2 support.

Method Summary
protected  voidaddEventListener(NodeImpl node, String type, EventListener listener, boolean useCapture)
    
public  NodeadoptNode(Node source)
    
protected  voidchanged()
     Denotes that this node has changed.
protected  intchanges()
     Returns the number of changes to this node.
public  Objectclone()
     Clone.
public  NodecloneNode(boolean deep)
     Deep-clone a document, including fixing ownerDoc for the cloned children.
protected  voidcloneNode(CoreDocumentImpl newdoc, boolean deep)
    
public  AttrcreateAttribute(String name)
     Factory method; creates an Attribute having this Document as its OwnerDoc.
Parameters:
  name - The name of the attribute.
public  AttrcreateAttributeNS(String namespaceURI, String qualifiedName)
     Introduced in DOM Level 2.
public  CDATASectioncreateCDATASection(String data)
     Factory method; creates a CDATASection having this Document as its OwnerDoc.
Parameters:
  data - The initial contents of the CDATA
throws:
  DOMException - (NOT_SUPPORTED_ERR) for HTML documents.
public  CommentcreateComment(String data)
     Factory method; creates a Comment having this Document as its OwnerDoc.
Parameters:
  data - The initial contents of the Comment.
public  DocumentFragmentcreateDocumentFragment()
     Factory method; creates a DocumentFragment having this Document as its OwnerDoc.
public  DocumentTypecreateDocumentType(String qualifiedName, String publicID, String systemID)
     NON-DOM Factory method; creates a DocumentType having this Document as its OwnerDoc.
public  ElementcreateElement(String tagName)
     Factory method; creates an Element having this Document as its OwnerDoc.
Parameters:
  tagName - The name of the element type to instantiate.
public  ElementDefinitionImplcreateElementDefinition(String name)
     NON-DOM Factory method: creates an element definition.
public  ElementcreateElementNS(String namespaceURI, String qualifiedName)
     Introduced in DOM Level 2.
public  EntitycreateEntity(String name)
     NON-DOM Factory method; creates an Entity having this Document as its OwnerDoc.
public  EntityReferencecreateEntityReference(String name)
     Factory method; creates an EntityReference having this Document as its OwnerDoc.
Parameters:
  name - The name of the Entity we wish to refer to
throws:
  DOMException - (NOT_SUPPORTED_ERR) for HTML documents, wherenonstandard entities are not permitted.
public  NotationcreateNotation(String name)
     NON-DOM Factory method; creates a Notation having this Document as its OwnerDoc.
public  ProcessingInstructioncreateProcessingInstruction(String target, String data)
     Factory method; creates a ProcessingInstruction having this Document as its OwnerDoc.
Parameters:
  target - The target "processor channel"
Parameters:
  data - Parameter string to be passed to the target.
throws:
  DOMException - (INVALID_NAME_ERR) if the target name is notacceptable.
throws:
  DOMException - (NOT_SUPPORTED_ERR) for HTML documents.
public  TextcreateTextNode(String data)
     Factory method; creates a Text node having this Document as its OwnerDoc.
 voiddeletedText(NodeImpl node, int offset, int count)
     A method to be called when some text was deleted from a text node, so that live objects can be notified.
protected  booleandispatchEvent(NodeImpl node, Event event)
    
public  DocumentTypegetDoctype()
     For XML, this provides access to the Document Type Definition.
public  ElementgetDocumentElement()
     Convenience method, allowing direct access to the child node which is considered the root of the actual document content.
public  ElementgetElementById(String elementId)
     Introduced in DOM Level 2 Returns the Element whose ID is given by elementId.
public  NodeListgetElementsByTagName(String tagname)
     Return a live collection of all descendent Elements (not just immediate children) having the specified tag name.
Parameters:
  tagname - The type of Element we want to gather.
public  NodeListgetElementsByTagNameNS(String namespaceURI, String localName)
     Introduced in DOM Level 2.
public  StringgetEncoding()
     DOM Level 3 WD - Experimental.
public  booleangetErrorChecking()
     Returns true if the DOM implementation performs error checking.
public  ElementgetIdentifier(String idName)
     Returns a previously registered element with the specified identifier name, or null if no element is registered.
public  EnumerationgetIdentifiers()
     Returns an enumeration registered of identifier names.
public  DOMImplementationgetImplementation()
     Retrieve information describing the abilities of this particular DOM implementation.
 booleangetMutationEvents()
     Returns true if the DOM implementation generates mutation events.
public  StringgetNodeName()
     Returns the node name.
public  shortgetNodeType()
     Returns the node type.
final public  DocumentgetOwnerDocument()
    
public  booleangetStandalone()
     DOM Level 3 WD - Experimental.
public  booleangetStrictErrorChecking()
    
protected  ObjectgetUserData(NodeImpl n)
    
public  StringgetVersion()
     DOM Level 3 WD - Experimental.
public  NodeimportNode(Node source, boolean deep)
     Copies a node from another document to this document.
public  NodeinsertBefore(Node newChild, Node refChild)
     Since a Document may contain at most one top-level Element child, and at most one DocumentType declaraction, we need to subclass our add-children methods to implement this constraint.
 voidinsertedNode(NodeImpl node, NodeImpl newInternal, boolean replace)
     A method to be called when a node has been inserted in the tree.
 voidinsertedText(NodeImpl node, int offset, int count)
     A method to be called when some text was inserted into a text node, so that live objects can be notified.
 voidinsertingNode(NodeImpl node, boolean replace)
     A method to be called when a node is about to be inserted in the tree.
protected  booleanisKidOK(Node parent, Node child)
     Uses the kidOK lookup table to check whether the proposed tree structure is legal.
public static  booleanisXMLName(String s)
    
 voidmodifiedAttrValue(AttrImpl attr, String oldvalue)
    
 voidmodifiedCharacterData(NodeImpl node, String oldvalue, String value)
    
 voidmodifyingCharacterData(NodeImpl node)
    
public  voidputIdentifier(String idName, Element element)
     Registers an identifier name with a specified element node. If the identifier is already registered, the new element node replaces the previous node.
public  NoderemoveChild(Node oldChild)
    
protected  voidremoveEventListener(NodeImpl node, String type, EventListener listener, boolean useCapture)
    
public  voidremoveIdentifier(String idName)
     Removes a previously registered element with the specified identifier name.
 voidremovedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name)
    
 voidremovedNode(NodeImpl node, boolean replace)
     A method to be called when a node has been removed from the tree.
 voidremovingNode(NodeImpl node, NodeImpl oldChild, boolean replace)
     A method to be called when a node is about to be removed from the tree.
public  NodereplaceChild(Node newChild, Node oldChild)
    
 voidreplacedNode(NodeImpl node)
     A method to be called when a node has been replaced in the tree.
 voidreplacedText(NodeImpl node)
     A method to be called when some text was changed in a text node, so that live objects can be notified.
 voidreplacingNode(NodeImpl node)
     A method to be called when a node is about to be replaced in the tree.
 voidsetAttrNode(AttrImpl attr, AttrImpl previous)
    
public  voidsetEncoding(String value)
     DOM Level 3 WD - Experimental. An attribute specifying, as part of the XML declaration, the encoding of this document.
public  voidsetErrorChecking(boolean check)
     Sets whether the DOM implementation performs error checking upon operations.
 voidsetMutationEvents(boolean set)
     Sets whether the DOM implementation generates mutation events upon operations.
public  voidsetStandalone(boolean value)
     DOM Level 3 WD - Experimental.
public  voidsetStrictErrorChecking(boolean check)
    
protected  voidsetUserData(NodeImpl n, Object data)
     Store user data related to a given node This is a place where we could use weak references! Indeed, the node here won't be GC'ed as long as some user data is attached to it, since the userData table will have a reference to the node.
public  voidsetVersion(String value)
     DOM Level 3 WD - Experimental. version - An attribute specifying, as part of the XML declaration, the version number of this document.

Field Detail
allowGrammarAccess
protected boolean allowGrammarAccess(Code)
Allow grammar access.



changes
protected int changes(Code)
Number of alterations made to this document since its creation. Serves as a "dirty bit" so that live objects such as NodeList can recognize when an alteration has been made and discard its cached state information.

Any method that alters the tree structure MUST cause or be accompanied by a call to changed(), to inform it that any outstanding NodeLists may have to be updated.

(Required because NodeList is simultaneously "live" and integer- indexed -- a bad decision in the DOM's design.)

Note that changes which do not affect the tree's structure -- changing the node's name, for example -- do _not_ have to call changed().

Alternative implementation would be to use a cryptographic Digest value rather than a count. This would have the advantage that "harmless" changes (those producing equal() trees) would not force NodeList to resynchronize. Disadvantage is that it's slightly more prone to "false negatives", though that's the difference between "wildly unlikely" and "absurdly unlikely". IF we start maintaining digests, we should consider taking advantage of them. Note: This used to be done a node basis, so that we knew what subtree changed. But since only DeepNodeList really use this today, the gain appears to be really small compared to the cost of having an int on every (parent) node plus having to walk up the tree all the way to the root to mark the branch as changed everytime a node is changed. So we now have a single counter global to the document. It means that some objects may flush their cache more often than necessary, but this makes nodes smaller and only the document needs to be marked as changed.




docElement
protected ElementImpl docElement(Code)
Document element.



docType
protected DocumentTypeImpl docType(Code)
Document type.



encoding
protected String encoding(Code)
Experimental DOM Level 3 feature: Document encoding



errorChecking
protected boolean errorChecking(Code)
Bypass error checking.



identifiers
protected Hashtable identifiers(Code)
Identifiers.



kidOK
protected static int[] kidOK(Code)
Table for quick check of child insertion.



serialVersionUID
final static long serialVersionUID(Code)
Serialization version.



standalone
protected boolean standalone(Code)
Experimental DOM Level 3 feature: Document standalone



version
protected String version(Code)
Experimental DOM Level 3 feature: Document version




Constructor Detail
CoreDocumentImpl
public CoreDocumentImpl()(Code)
NON-DOM: Actually creating a Document is outside the DOM's spec, since it has to operate in terms of a particular implementation.



CoreDocumentImpl
public CoreDocumentImpl(boolean grammarAccess)(Code)
Constructor.



CoreDocumentImpl
public CoreDocumentImpl(DocumentType doctype)(Code)
For DOM2 support. The createDocument factory method is in DOMImplementation.



CoreDocumentImpl
public CoreDocumentImpl(DocumentType doctype, boolean grammarAccess)(Code)
For DOM2 support.




Method Detail
addEventListener
protected void addEventListener(NodeImpl node, String type, EventListener listener, boolean useCapture)(Code)



adoptNode
public Node adoptNode(Node source)(Code)
DOM Level 3 WD - Experimental Change the node's ownerDocument, and its subtree, to this Document
Parameters:
  source - The node to adopt.
See Also:   DocumentImpl.importNode



changed
protected void changed()(Code)
Denotes that this node has changed.



changes
protected int changes()(Code)
Returns the number of changes to this node.



clone
public Object clone() throws CloneNotSupportedException(Code)
Clone.



cloneNode
public Node cloneNode(boolean deep)(Code)
Deep-clone a document, including fixing ownerDoc for the cloned children. Note that this requires bypassing the WRONG_DOCUMENT_ERR protection. I've chosen to implement it by calling importNode which is DOM Level 2. org.w3c.dom.Node
Parameters:
  deep - boolean, iff true replicate children



cloneNode
protected void cloneNode(CoreDocumentImpl newdoc, boolean deep)(Code)
internal method to share code with subclass



createAttribute
public Attr createAttribute(String name) throws DOMException(Code)
Factory method; creates an Attribute having this Document as its OwnerDoc.
Parameters:
  name - The name of the attribute. Note that the attribute's valueis _not_ established at the factory; remember to set it!
throws:
  DOMException - (INVALID_NAME_ERR) if the attribute name is notacceptable.



createAttributeNS
public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException(Code)
Introduced in DOM Level 2.

Creates an attribute of the given qualified name and namespace URI. If the given namespaceURI is null or an empty string and the qualifiedName has a prefix that is "xml", the created element is bound to the predefined namespace "http://www.w3.org/XML/1998/namespace" [Namespaces].
Parameters:
  namespaceURI - The namespace URI of the attribute tocreate. When it is null or an empty string,this method behaves like createAttribute.
Parameters:
  qualifiedName - The qualified name of the attribute toinstantiate. Attr A new Attr object.
throws:
  DOMException - INVALID_CHARACTER_ERR: Raised if the specifiedname contains an invalid character.
since:
   WD-DOM-Level-2-19990923




createCDATASection
public CDATASection createCDATASection(String data) throws DOMException(Code)
Factory method; creates a CDATASection having this Document as its OwnerDoc.
Parameters:
  data - The initial contents of the CDATA
throws:
  DOMException - (NOT_SUPPORTED_ERR) for HTML documents. (HTMLnot yet implemented.)



createComment
public Comment createComment(String data)(Code)
Factory method; creates a Comment having this Document as its OwnerDoc.
Parameters:
  data - The initial contents of the Comment.



createDocumentFragment
public DocumentFragment createDocumentFragment()(Code)
Factory method; creates a DocumentFragment having this Document as its OwnerDoc.



createDocumentType
public DocumentType createDocumentType(String qualifiedName, String publicID, String systemID) throws DOMException(Code)
NON-DOM Factory method; creates a DocumentType having this Document as its OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building DTD information unspecified.)
Parameters:
  name - The name of the Entity we wish to provide a value for.
throws:
  DOMException - (NOT_SUPPORTED_ERR) for HTML documents, whereDTDs are not permitted. (HTML not yet implemented.)



createElement
public Element createElement(String tagName) throws DOMException(Code)
Factory method; creates an Element having this Document as its OwnerDoc.
Parameters:
  tagName - The name of the element type to instantiate. ForXML, this is case-sensitive. For HTML, the tagName parameter maybe provided in any case, but it must be mapped to the canonicaluppercase form by the DOM implementation.
throws:
  DOMException - (INVALID_NAME_ERR) if the tag name is notacceptable.



createElementDefinition
public ElementDefinitionImpl createElementDefinition(String name) throws DOMException(Code)
NON-DOM Factory method: creates an element definition. Element definitions hold default attribute values.



createElementNS
public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException(Code)
Introduced in DOM Level 2.

Creates an element of the given qualified name and namespace URI. If the given namespaceURI is null or an empty string and the qualifiedName has a prefix that is "xml", the created element is bound to the predefined namespace "http://www.w3.org/XML/1998/namespace" [Namespaces].
Parameters:
  namespaceURI - The namespace URI of the element tocreate.
Parameters:
  qualifiedName - The qualified name of the element type toinstantiate. Element A new Element object with the following attributes:
throws:
  DOMException - INVALID_CHARACTER_ERR: Raised if the specifiedname contains an invalid character.
throws:
  DOMException - NAMESPACE_ERR: Raised if the qualifiedName has aprefix that is "xml" and the namespaceURI isneither null nor an empty string nor"http://www.w3.org/XML/1998/namespace", orif the qualifiedName has a prefix differentfrom "xml" and the namespaceURI is null or anempty string.
since:
   WD-DOM-Level-2-19990923




createEntity
public Entity createEntity(String name) throws DOMException(Code)
NON-DOM Factory method; creates an Entity having this Document as its OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building DTD information unspecified.)
Parameters:
  name - The name of the Entity we wish to provide a value for.
throws:
  DOMException - (NOT_SUPPORTED_ERR) for HTML documents, wherenonstandard entities are not permitted. (HTML not yetimplemented.)



createEntityReference
public EntityReference createEntityReference(String name) throws DOMException(Code)
Factory method; creates an EntityReference having this Document as its OwnerDoc.
Parameters:
  name - The name of the Entity we wish to refer to
throws:
  DOMException - (NOT_SUPPORTED_ERR) for HTML documents, wherenonstandard entities are not permitted. (HTML not yetimplemented.)



createNotation
public Notation createNotation(String name) throws DOMException(Code)
NON-DOM Factory method; creates a Notation having this Document as its OwnerDoc. (REC-DOM-Level-1-19981001 left the process of building DTD information unspecified.)
Parameters:
  name - The name of the Notation we wish to describe
throws:
  DOMException - (NOT_SUPPORTED_ERR) for HTML documents, wherenotations are not permitted. (HTML not yetimplemented.)



createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException(Code)
Factory method; creates a ProcessingInstruction having this Document as its OwnerDoc.
Parameters:
  target - The target "processor channel"
Parameters:
  data - Parameter string to be passed to the target.
throws:
  DOMException - (INVALID_NAME_ERR) if the target name is notacceptable.
throws:
  DOMException - (NOT_SUPPORTED_ERR) for HTML documents. (HTMLnot yet implemented.)



createTextNode
public Text createTextNode(String data)(Code)
Factory method; creates a Text node having this Document as its OwnerDoc.
Parameters:
  data - The initial contents of the Text.



deletedText
void deletedText(NodeImpl node, int offset, int count)(Code)
A method to be called when some text was deleted from a text node, so that live objects can be notified.



dispatchEvent
protected boolean dispatchEvent(NodeImpl node, Event event)(Code)



getDoctype
public DocumentType getDoctype()(Code)
For XML, this provides access to the Document Type Definition. For HTML documents, and XML documents which don't specify a DTD, it will be null.



getDocumentElement
public Element getDocumentElement()(Code)
Convenience method, allowing direct access to the child node which is considered the root of the actual document content. For HTML, where it is legal to have more than one Element at the top level of the document, we pick the one with the tagName "HTML". For XML there should be only one top-level (HTML not yet supported.)



getElementById
public Element getElementById(String elementId)(Code)
Introduced in DOM Level 2 Returns the Element whose ID is given by elementId. If no such element exists, returns null. Behavior is not defined if more than one element has this ID.

Note: The DOM implementation must have information that says which attributes are of type ID. Attributes with the name "ID" are not of type ID unless so defined. Implementations that do not know whether attributes are of type ID or not are expected to return null.
See Also:   CoreDocumentImpl.getIdentifier




getElementsByTagName
public NodeList getElementsByTagName(String tagname)(Code)
Return a live collection of all descendent Elements (not just immediate children) having the specified tag name.
Parameters:
  tagname - The type of Element we want to gather. "*" will betaken as a wildcard, meaning "all elements in the document."
See Also:   DeepNodeListImpl



getElementsByTagNameNS
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)(Code)
Introduced in DOM Level 2.

Returns a NodeList of all the Elements with a given local name and namespace URI in the order in which they would be encountered in a preorder traversal of the Document tree.
Parameters:
  namespaceURI - The namespace URI of the elements to matchon. The special value "*" matches allnamespaces. When it is null or an emptystring, this method behaves likegetElementsByTagName.
Parameters:
  localName - The local name of the elements to match on.The special value "*" matches all local names. NodeList A new NodeList object containing all the matchedElements.
since:
   WD-DOM-Level-2-19990923




getEncoding
public String getEncoding()(Code)
DOM Level 3 WD - Experimental. The encoding of this document (part of XML Declaration)



getErrorChecking
public boolean getErrorChecking()(Code)
Returns true if the DOM implementation performs error checking.



getIdentifier
public Element getIdentifier(String idName)(Code)
Returns a previously registered element with the specified identifier name, or null if no element is registered.
See Also:   CoreDocumentImpl.putIdentifier
See Also:   CoreDocumentImpl.removeIdentifier



getIdentifiers
public Enumeration getIdentifiers()(Code)
Returns an enumeration registered of identifier names.



getImplementation
public DOMImplementation getImplementation()(Code)
Retrieve information describing the abilities of this particular DOM implementation. Intended to support applications that may be using DOMs retrieved from several different sources, potentially with different underlying representations.



getMutationEvents
boolean getMutationEvents()(Code)
Returns true if the DOM implementation generates mutation events.



getNodeName
public String getNodeName()(Code)
Returns the node name.



getNodeType
public short getNodeType()(Code)
Returns the node type.



getOwnerDocument
final public Document getOwnerDocument()(Code)



getStandalone
public boolean getStandalone()(Code)
DOM Level 3 WD - Experimental. standalone that specifies whether this document is standalone (part of XML Declaration)



getStrictErrorChecking
public boolean getStrictErrorChecking()(Code)



getUserData
protected Object getUserData(NodeImpl n)(Code)
Retreive user data related to a given node



getVersion
public String getVersion()(Code)
DOM Level 3 WD - Experimental. The version of this document (part of XML Declaration)



importNode
public Node importNode(Node source, boolean deep) throws DOMException(Code)
Copies a node from another document to this document. The new nodes are created using this document's factory methods and are populated with the data from the source's accessor methods defined by the DOM interfaces. Its behavior is otherwise similar to that of cloneNode.

According to the DOM specifications, document nodes cannot be imported and a NOT_SUPPORTED_ERR exception is thrown if attempted.




insertBefore
public Node insertBefore(Node newChild, Node refChild) throws DOMException(Code)
Since a Document may contain at most one top-level Element child, and at most one DocumentType declaraction, we need to subclass our add-children methods to implement this constraint. Since appendChild() is implemented as insertBefore(,null), altering the latter fixes both.

While I'm doing so, I've taken advantage of the opportunity to cache documentElement and docType so we don't have to search for them. REVISIT: According to the spec it is not allowed to alter neither the document element nor the document type in any way




insertedNode
void insertedNode(NodeImpl node, NodeImpl newInternal, boolean replace)(Code)
A method to be called when a node has been inserted in the tree.



insertedText
void insertedText(NodeImpl node, int offset, int count)(Code)
A method to be called when some text was inserted into a text node, so that live objects can be notified.



insertingNode
void insertingNode(NodeImpl node, boolean replace)(Code)
A method to be called when a node is about to be inserted in the tree.



isKidOK
protected boolean isKidOK(Node parent, Node child)(Code)
Uses the kidOK lookup table to check whether the proposed tree structure is legal.



isXMLName
public static boolean isXMLName(String s)(Code)
Check the string against XML's definition of acceptable names for elements and attributes and so on using the XMLCharacterProperties utility class



modifiedAttrValue
void modifiedAttrValue(AttrImpl attr, String oldvalue)(Code)
A method to be called when an attribute value has been modified



modifiedCharacterData
void modifiedCharacterData(NodeImpl node, String oldvalue, String value)(Code)
A method to be called when a character data node has been modified



modifyingCharacterData
void modifyingCharacterData(NodeImpl node)(Code)
A method to be called when a character data node has been modified



putIdentifier
public void putIdentifier(String idName, Element element)(Code)
Registers an identifier name with a specified element node. If the identifier is already registered, the new element node replaces the previous node. If the specified element node is null, removeIdentifier() is called.
See Also:   CoreDocumentImpl.getIdentifier
See Also:   CoreDocumentImpl.removeIdentifier



removeChild
public Node removeChild(Node oldChild) throws DOMException(Code)
Since insertBefore caches the docElement (and, currently, docType), removeChild has to know how to undo the cache REVISIT: According to the spec it is not allowed to alter neither the document element nor the document type in any way



removeEventListener
protected void removeEventListener(NodeImpl node, String type, EventListener listener, boolean useCapture)(Code)



removeIdentifier
public void removeIdentifier(String idName)(Code)
Removes a previously registered element with the specified identifier name.
See Also:   CoreDocumentImpl.putIdentifier
See Also:   CoreDocumentImpl.getIdentifier



removedAttrNode
void removedAttrNode(AttrImpl attr, NodeImpl oldOwner, String name)(Code)
A method to be called when an attribute node has been removed



removedNode
void removedNode(NodeImpl node, boolean replace)(Code)
A method to be called when a node has been removed from the tree.



removingNode
void removingNode(NodeImpl node, NodeImpl oldChild, boolean replace)(Code)
A method to be called when a node is about to be removed from the tree.



replaceChild
public Node replaceChild(Node newChild, Node oldChild) throws DOMException(Code)
Since we cache the docElement (and, currently, docType), replaceChild has to update the cache REVISIT: According to the spec it is not allowed to alter neither the document element nor the document type in any way



replacedNode
void replacedNode(NodeImpl node)(Code)
A method to be called when a node has been replaced in the tree.



replacedText
void replacedText(NodeImpl node)(Code)
A method to be called when some text was changed in a text node, so that live objects can be notified.



replacingNode
void replacingNode(NodeImpl node)(Code)
A method to be called when a node is about to be replaced in the tree.



setAttrNode
void setAttrNode(AttrImpl attr, AttrImpl previous)(Code)
A method to be called when an attribute node has been set



setEncoding
public void setEncoding(String value)(Code)
DOM Level 3 WD - Experimental. An attribute specifying, as part of the XML declaration, the encoding of this document. This is null when unspecified.



setErrorChecking
public void setErrorChecking(boolean check)(Code)
Sets whether the DOM implementation performs error checking upon operations. Turning off error checking only affects the following DOM checks:
  • Checking strings to make sure that all characters are legal XML characters
  • Hierarchy checking such as allowed children, checks for cycles, etc.

Turning off error checking does not turn off the following checks:

  • Read only checks
  • Checks related to DOM events



setMutationEvents
void setMutationEvents(boolean set)(Code)
Sets whether the DOM implementation generates mutation events upon operations.



setStandalone
public void setStandalone(boolean value)(Code)
DOM Level 3 WD - Experimental. standalone - An attribute specifying, as part of the XML declaration, whether this document is standalone



setStrictErrorChecking
public void setStrictErrorChecking(boolean check)(Code)



setUserData
protected void setUserData(NodeImpl n, Object data)(Code)
Store user data related to a given node This is a place where we could use weak references! Indeed, the node here won't be GC'ed as long as some user data is attached to it, since the userData table will have a reference to the node.



setVersion
public void setVersion(String value)(Code)
DOM Level 3 WD - Experimental. version - An attribute specifying, as part of the XML declaration, the version number of this document. This is null when unspecified



Fields inherited from org.apache.xerces.dom.ParentNode
protected transient ChildNode fCachedChild(Code)(Java Doc)
protected transient int fCachedChildIndex(Code)(Java Doc)
protected transient int fCachedLength(Code)(Java Doc)
protected ChildNode firstChild(Code)(Java Doc)
protected CoreDocumentImpl ownerDocument(Code)(Java Doc)
final static long serialVersionUID(Code)(Java Doc)

Methods inherited from org.apache.xerces.dom.ParentNode
void checkNormalizationAfterInsert(ChildNode insertedChild)(Code)(Java Doc)
void checkNormalizationAfterRemove(ChildNode previousSibling)(Code)(Java Doc)
public Node cloneNode(boolean deep)(Code)(Java Doc)
public NodeList getChildNodes()(Code)(Java Doc)
final protected NodeList getChildNodesUnoptimized()(Code)(Java Doc)
public Node getFirstChild()(Code)(Java Doc)
public Node getLastChild()(Code)(Java Doc)
public int getLength()(Code)(Java Doc)
public Document getOwnerDocument()(Code)(Java Doc)
public boolean hasChildNodes()(Code)(Java Doc)
public Node insertBefore(Node newChild, Node refChild) throws DOMException(Code)(Java Doc)
Node internalInsertBefore(Node newChild, Node refChild, boolean replace) throws DOMException(Code)(Java Doc)
Node internalRemoveChild(Node oldChild, boolean replace) throws DOMException(Code)(Java Doc)
public Node item(int index)(Code)(Java Doc)
final ChildNode lastChild()(Code)(Java Doc)
final void lastChild(ChildNode node)(Code)(Java Doc)
public void normalize()(Code)(Java Doc)
CoreDocumentImpl ownerDocument()(Code)(Java Doc)
public Node removeChild(Node oldChild) throws DOMException(Code)(Java Doc)
public Node replaceChild(Node newChild, Node oldChild) throws DOMException(Code)(Java Doc)
void setOwnerDocument(CoreDocumentImpl doc)(Code)(Java Doc)
public void setReadOnly(boolean readOnly, boolean deep)(Code)(Java Doc)
protected void synchronizeChildren()(Code)(Java Doc)

Fields inherited from org.apache.xerces.dom.ChildNode
protected ChildNode nextSibling(Code)(Java Doc)
protected ChildNode previousSibling(Code)(Java Doc)
final static long serialVersionUID(Code)(Java Doc)

Methods inherited from org.apache.xerces.dom.ChildNode
public Node cloneNode(boolean deep)(Code)(Java Doc)
public Node getNextSibling()(Code)(Java Doc)
public Node getParentNode()(Code)(Java Doc)
public Node getPreviousSibling()(Code)(Java Doc)
final NodeImpl parentNode()(Code)(Java Doc)
final ChildNode previousSibling()(Code)(Java Doc)

Fields inherited from org.apache.xerces.dom.NodeImpl
final public static short ELEMENT_DEFINITION_NODE(Code)(Java Doc)
final protected static short FIRSTCHILD(Code)(Java Doc)
final protected static short HASSTRING(Code)(Java Doc)
final protected static short IGNORABLEWS(Code)(Java Doc)
final protected static short OWNED(Code)(Java Doc)
final protected static short READONLY(Code)(Java Doc)
final protected static short SPECIFIED(Code)(Java Doc)
final protected static short SYNCCHILDREN(Code)(Java Doc)
final protected static short SYNCDATA(Code)(Java Doc)
final protected static short UNNORMALIZED(Code)(Java Doc)
protected short flags(Code)(Java Doc)
protected NodeImpl ownerNode(Code)(Java Doc)
final static long serialVersionUID(Code)(Java Doc)

Methods inherited from org.apache.xerces.dom.NodeImpl
public void addEventListener(String type, EventListener listener, boolean useCapture)(Code)(Java Doc)
public Node appendChild(Node newChild) throws DOMException(Code)(Java Doc)
protected void changed()(Code)(Java Doc)
protected int changes()(Code)(Java Doc)
public Node cloneNode(boolean deep)(Code)(Java Doc)
public boolean dispatchEvent(Event event)(Code)(Java Doc)
public NamedNodeMap getAttributes()(Code)(Java Doc)
public NodeList getChildNodes()(Code)(Java Doc)
public Node getFirstChild()(Code)(Java Doc)
public Node getLastChild()(Code)(Java Doc)
public int getLength()(Code)(Java Doc)
public String getLocalName()(Code)(Java Doc)
public String getNamespaceURI()(Code)(Java Doc)
public Node getNextSibling()(Code)(Java Doc)
abstract public String getNodeName()(Code)(Java Doc)
abstract public short getNodeType()(Code)(Java Doc)
public String getNodeValue()(Code)(Java Doc)
public Document getOwnerDocument()(Code)(Java Doc)
public Node getParentNode()(Code)(Java Doc)
public String getPrefix()(Code)(Java Doc)
public Node getPreviousSibling()(Code)(Java Doc)
public boolean getReadOnly()(Code)(Java Doc)
public Object getUserData()(Code)(Java Doc)
public boolean hasAttributes()(Code)(Java Doc)
public boolean hasChildNodes()(Code)(Java Doc)
final boolean hasStringValue()(Code)(Java Doc)
final void hasStringValue(boolean value)(Code)(Java Doc)
public Node insertBefore(Node newChild, Node refChild) throws DOMException(Code)(Java Doc)
final boolean internalIsIgnorableWhitespace()(Code)(Java Doc)
final boolean isFirstChild()(Code)(Java Doc)
final void isFirstChild(boolean value)(Code)(Java Doc)
final void isIgnorableWhitespace(boolean value)(Code)(Java Doc)
final boolean isNormalized()(Code)(Java Doc)
final void isNormalized(boolean value)(Code)(Java Doc)
final boolean isOwned()(Code)(Java Doc)
final void isOwned(boolean value)(Code)(Java Doc)
final boolean isReadOnly()(Code)(Java Doc)
final void isReadOnly(boolean value)(Code)(Java Doc)
final boolean isSpecified()(Code)(Java Doc)
final void isSpecified(boolean value)(Code)(Java Doc)
public boolean isSupported(String feature, String version)(Code)(Java Doc)
public Node item(int index)(Code)(Java Doc)
final boolean needsSyncChildren()(Code)(Java Doc)
final void needsSyncChildren(boolean value)(Code)(Java Doc)
final boolean needsSyncData()(Code)(Java Doc)
final void needsSyncData(boolean value)(Code)(Java Doc)
public void normalize()(Code)(Java Doc)
CoreDocumentImpl ownerDocument()(Code)(Java Doc)
NodeImpl parentNode()(Code)(Java Doc)
ChildNode previousSibling()(Code)(Java Doc)
public Node removeChild(Node oldChild) throws DOMException(Code)(Java Doc)
public void removeEventListener(String type, EventListener listener, boolean useCapture)(Code)(Java Doc)
public Node replaceChild(Node newChild, Node oldChild) throws DOMException(Code)(Java Doc)
public void setNodeValue(String x) throws DOMException(Code)(Java Doc)
void setOwnerDocument(CoreDocumentImpl doc)(Code)(Java Doc)
public void setPrefix(String prefix) throws DOMException(Code)(Java Doc)
public void setReadOnly(boolean readOnly, boolean deep)(Code)(Java Doc)
public void setUserData(Object data)(Code)(Java Doc)
protected void synchronizeData()(Code)(Java Doc)
public String toString()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.