📄 domnode.hpp
字号:
* satisfied: The two nodes are of the same type.The following string * attributes are equal: <code>nodeName</code>, <code>localName</code>, * <code>namespaceURI</code>, <code>prefix</code>, <code>nodeValue</code> * , <code>baseURI</code>. This is: they are both <code>null</code>, or * they have the same length and are character for character identical. * The <code>attributes</code> <code>DOMNamedNodeMaps</code> are equal. * This is: they are both <code>null</code>, or they have the same * length and for each node that exists in one map there is a node that * exists in the other map and is equal, although not necessarily at the * same index.The <code>childNodes</code> <code>DOMNodeLists</code> are * equal. This is: they are both <code>null</code>, or they have the * same length and contain equal nodes at the same index. This is true * for <code>DOMAttr</code> nodes as for any other type of node. Note that * normalization can affect equality; to avoid this, nodes should be * normalized before being compared. * <br>For two <code>DOMDocumentType</code> nodes to be equal, the following * conditions must also be satisfied: The following string attributes * are equal: <code>publicId</code>, <code>systemId</code>, * <code>internalSubset</code>.The <code>entities</code> * <code>DOMNamedNodeMaps</code> are equal.The <code>notations</code> * <code>DOMNamedNodeMaps</code> are equal. * <br>On the other hand, the following do not affect equality: the * <code>ownerDocument</code> attribute, the <code>specified</code> * attribute for <code>DOMAttr</code> nodes, the * <code>isWhitespaceInElementContent</code> attribute for * <code>DOMText</code> nodes, as well as any user data or event listeners * registered on the nodes. * * <p><b>"Experimental - subject to change"</b></p> * * @param arg The node to compare equality with. * @return If the nodes, and possibly subtrees are equal, * <code>true</code> otherwise <code>false</code>. * @since DOM Level 3 */ virtual bool isEqualNode(const DOMNode* arg) const = 0; /** * Associate an object to a key on this node. The object can later be * retrieved from this node by calling <code>getUserData</code> with the * same key. * * Deletion of the user data remains the responsibility of the * application program; it will not be automatically deleted when * the nodes themselves are reclaimed. * * Both the parameter <code>data</code> and the returned object are * void pointer, it is applications' responsibility to keep track of * their original type. Casting them to the wrong type may result * unexpected behavior. * * <p><b>"Experimental - subject to change"</b></p> * * @param key The key to associate the object to. * @param data The object to associate to the given key, or * <code>null</code> to remove any existing association to that key. * @param handler The handler to associate to that key, or * <code>null</code>. * @return Returns the void* object previously associated to * the given key on this node, or <code>null</code> if there was none. * @see getUserData * * @since DOM Level 3 */ virtual void* setUserData(const XMLCh* key, void* data, DOMUserDataHandler* handler) = 0; /** * Retrieves the object associated to a key on a this node. The object * must first have been set to this node by calling * <code>setUserData</code> with the same key. * * <p><b>"Experimental - subject to change"</b></p> * * @param key The key the object is associated to. * @return Returns the <code>void*</code> associated to the given key * on this node, or <code>null</code> if there was none. * @see setUserData * @since DOM Level 3 */ virtual void* getUserData(const XMLCh* key) const = 0; /** * The absolute base URI of this node or <code>null</code> if undefined. * This value is computed according to . However, when the * <code>DOMDocument</code> supports the feature "HTML" , the base URI is * computed using first the value of the href attribute of the HTML BASE * element if any, and the value of the <code>documentURI</code> * attribute from the <code>DOMDocument</code> interface otherwise. * * <p><b>"Experimental - subject to change"</b></p> * * <br> When the node is an <code>DOMElement</code>, a <code>DOMDocument</code> * or a a <code>DOMProcessingInstruction</code>, this attribute represents * the properties [base URI] defined in . When the node is a * <code>DOMNotation</code>, an <code>DOMEntity</code>, or an * <code>DOMEntityReference</code>, this attribute represents the * properties [declaration base URI]. * @since DOM Level 3 */ virtual const XMLCh* getBaseURI() const = 0; /** * Compares a node with this node with regard to their position in the * tree and according to the document order. This order can be extended * by module that define additional types of nodes. * * <p><b>"Experimental - subject to change"</b></p> * * @param other The node to compare against this node. * @return Returns how the given node is positioned relatively to this * node. * @since DOM Level 3 */ virtual short compareTreePosition(const DOMNode* other) const = 0; /** * This attribute returns the text content of this node and its * descendants. When it is defined to be null, setting it has no effect. * When set, any possible children this node may have are removed and * replaced by a single <code>DOMText</code> node containing the string * this attribute is set to. On getting, no serialization is performed, * the returned string does not contain any markup. No whitespace * normalization is performed, the returned string does not contain the * element content whitespaces . Similarly, on setting, no parsing is * performed either, the input string is taken as pure textual content. * * <p><b>"Experimental - subject to change"</b></p> * * <br>The string returned is made of the text content of this node * depending on its type, as defined below: * <table border='1'> * <tr> * <th>Node type</th> * <th>Content</th> * </tr> * <tr> * <td valign='top' rowspan='1' colspan='1'> * ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, * DOCUMENT_FRAGMENT_NODE</td> * <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code> * attribute value of every child node, excluding COMMENT_NODE and * PROCESSING_INSTRUCTION_NODE nodes</td> * </tr> * <tr> * <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, TEXT_NODE, * CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE</td> * <td valign='top' rowspan='1' colspan='1'> * <code>nodeValue</code></td> * </tr> * <tr> * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE</td> * <td valign='top' rowspan='1' colspan='1'> * null</td> * </tr> * </table> * @exception DOMException * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. * @exception DOMException * DOMSTRING_SIZE_ERR: Raised when it would return more characters than * fit in a <code>DOMString</code> variable on the implementation * platform. * @since DOM Level 3 */ virtual const XMLCh* getTextContent() const = 0; /** * This attribute returns the text content of this node and its * descendants. When it is defined to be null, setting it has no effect. * When set, any possible children this node may have are removed and * replaced by a single <code>DOMText</code> node containing the string * this attribute is set to. On getting, no serialization is performed, * the returned string does not contain any markup. No whitespace * normalization is performed, the returned string does not contain the * element content whitespaces . Similarly, on setting, no parsing is * performed either, the input string is taken as pure textual content. * * <p><b>"Experimental - subject to change"</b></p> * * <br>The string returned is made of the text content of this node * depending on its type, as defined below: * <table border='1'> * <tr> * <th>Node type</th> * <th>Content</th> * </tr> * <tr> * <td valign='top' rowspan='1' colspan='1'> * ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, * DOCUMENT_FRAGMENT_NODE</td> * <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code> * attribute value of every child node, excluding COMMENT_NODE and * PROCESSING_INSTRUCTION_NODE nodes</td> * </tr> * <tr> * <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, TEXT_NODE, * CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE</td> * <td valign='top' rowspan='1' colspan='1'> * <code>nodeValue</code></td> * </tr> * <tr> * <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE</td> * <td valign='top' rowspan='1' colspan='1'> * null</td> * </tr> * </table> * @exception DOMException * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. * @exception DOMException * DOMSTRING_SIZE_ERR: Raised when it would return more characters than * fit in a <code>DOMString</code> variable on the implementation * platform. * @since DOM Level 3 */ virtual void setTextContent(const XMLCh* textContent) = 0; /** * Look up the prefix associated to the given namespace URI, starting from * this node. * * <p><b>"Experimental - subject to change"</b></p> * * @param namespaceURI The namespace URI to look for. * @param useDefault Indicates if the lookup mechanism should take into * account the default namespace or not. * @return Returns an associated namespace prefix if found, * <code>null</code> if none is found and <code>useDefault</code> is * false, or <code>null</code> if not found or it is the default * namespace and <code>useDefault</code> is <code>true</code>. If more * than one prefix are associated to the namespace prefix, the * returned namespace prefix is implementation dependent. * @since DOM Level 3 */ virtual const XMLCh* lookupNamespacePrefix(const XMLCh* namespaceURI, bool useDefault) const = 0; /** * This method checks if the specified <code>namespaceURI</code> is the * default namespace or not. * * <p><b>"Experimental - subject to change"</b></p> * * @param namespaceURI The namespace URI to look for. * @return <code>true</code> if the specified <code>namespaceURI</code> * is the default namespace, <code>false</code> otherwise. * @since DOM Level 3 */ virtual bool isDefaultNamespace(const XMLCh* namespaceURI) const = 0; /** * Look up the namespace URI associated to the given prefix, starting from * this node. * * <p><b>"Experimental - subject to change"</b></p> * * @param prefix The prefix to look for. If this parameter is * <code>null</code>, the method will return the default namespace URI * if any. * @return Returns the associated namespace URI or <code>null</code> if * none is found. * @since DOM Level 3 */ virtual const XMLCh* lookupNamespaceURI(const XMLCh* prefix) const = 0; /** * This method makes available a <code>DOMNode</code>'s specialized interface * * <p><b>"Experimental - subject to change"</b></p> * * @param feature The name of the feature requested (case-insensitive). * @return Returns an alternate <code>DOMNode</code> which implements the * specialized APIs of the specified feature, if any, or * <code>null</code> if there is no alternate <code>DOMNode</code> which * implements interfaces associated with that feature. Any alternate * <code>DOMNode</code> returned by this method must delegate to the * primary core <code>DOMNode</code> and not return results inconsistent * with the primary core <code>DOMNode</code> such as <code>key</code>, * <code>attributes</code>, <code>childNodes</code>, etc. * @since DOM Level 3 */ virtual DOMNode* getInterface(const XMLCh* feature) = 0; //@} // ----------------------------------------------------------------------- // Non-standard Extension // ----------------------------------------------------------------------- /** @name Non-standard Extension */ //@{ /** * Called to indicate that this Node (and its associated children) is no longer in use * and that the implementation may relinquish any resources associated with it and * its associated children. * * If this is a document, any nodes it owns (created by DOMDocument::createXXXX()) * are also released. * * Access to a released object will lead to unexpected result. * * @exception DOMException * INVALID_ACCESS_ERR: Raised if this Node has a parent and thus should not be released yet. */ virtual void release() = 0; //@} #if defined(XML_DOMREFCOUNT_EXPERIMENTAL) // ----------------------------------------------------------------------- // Non-standard Extension // ----------------------------------------------------------------------- /** @name Non-standard Extension */ //@{ /** * This is custom function which can be implemented by classes deriving * from DOMNode for implementing reference counting on DOMNodes. Any * implementation which has memory management model which involves * disposing of nodes immediately after being used can override this * function to do that job. */ virtual void decRefCount() {} //@} // ----------------------------------------------------------------------- // Non-standard Extension // ----------------------------------------------------------------------- /** @name Non-standard Extension */ //@{ /** * This is custom function which can be implemented by classes deriving * from DOMNode for implementing reference counting on DOMNodes. */ virtual void incRefCount() {} //@}#endif}; XERCES_CPP_NAMESPACE_END#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -