>
GdomeCommentGdome2 Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
This interface inherits from GdomeCharacterData and represents the content of a comment, i.e., all the characters between the starting '<!--' and ending '-->'.
Note: This is the definition of a comment in XML, and, in practice, HTML, although some HTML tools may implement the full SGML comment structure.
void gdome_c_set_data (GdomeComment *self, GdomeDOMString *data, GdomeException *exc); |
Sets the data value of this node.
GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
GdomeDOMString* gdome_c_substringData (GdomeComment *self, gulong offset, gulong count, GdomeException *exc); |
Extracts a range of data from the node.
GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the number of 16-bit units in data.
void gdome_c_appendData (GdomeComment *self, GdomeDOMString *arg, GdomeException *exc); |
Append the string to the end of the character data of the node. Upon success, data provides access to the concatenation of data and the string specified.
GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
void gdome_c_insertData (GdomeComment *self, gulong offset, GdomeDOMString *arg, GdomeException *exc); |
Insert a string at the specified 16-bit unit offset.
GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the number of 16-bit units in data. GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
void gdome_c_deleteData (GdomeComment *self, gulong offset, gulong count, GdomeException *exc); |
Remove a range of 16-bit units from the node. If the sum of offset and count exceeds length then all 16-bit units from offset to the end of the data are deleted. Upon success, data and length reflect the change.
GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the number of 16-bit units in data. GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
void gdome_c_replaceData (GdomeComment *self, gulong offset, gulong count, GdomeDOMString *arg, GdomeException *exc); |
Replace the characters starting at the specified 16-bit unit offset with the specified string. If the sum of offset and count exceeds length, then all 16-bit units to the end of the data are replaced;
GDOME_INDEX_SIZE_ERR: Raised if the specified offset is greater than the number of 16-bit units in data. GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
void gdome_c_ref (GdomeComment *self, GdomeException *exc); |
Increase the reference count of the specified Node.
void gdome_c_unref (GdomeComment *self, GdomeException *exc); |
Decrease the reference count of the specified Node. Free the Node structure if the Node will have zero reference.
gpointer gdome_c_query_interface (GdomeComment *self, const char *interface, GdomeException *exc); |
void gdome_c_set_nodeValue (GdomeComment *self, GdomeDOMString *nodeValue, GdomeException *exc); |
Sets The value of this node, depending on its type.
GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
GdomeNode* gdome_c_parentNode (GdomeComment *self, GdomeException *exc); |
self : | Node Object ref |
exc : | Exception Object ref |
Returns : | the parent of this node. All nodes, except Attr, Document, DocumentFragment, Entity, and Notation 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. |
GdomeNode* gdome_c_previousSibling (GdomeComment *self, GdomeException *exc); |
GdomeNamedNodeMap* gdome_c_attributes (GdomeComment *self, GdomeException *exc); |
GdomeDocument* gdome_c_ownerDocument (GdomeComment *self, GdomeException *exc); |
GdomeNode* gdome_c_insertBefore (GdomeComment *self, GdomeNode *newChild, GdomeNode *refChild, GdomeException *exc); |
Inserts the node newChild before the existing child node refChild. If refChild is NULL, insert newChild at the end of the list of children. If newChild is a DocumentFragment node, all of its children are inserted, in the same order, before refChild. If the newChild is already in the tree, it is first removed.
GDOME_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 or this node itself. GDOME_WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node. GDOME_NOT_FOUND_ERR: Raised if refChild is not a child of this node. GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
GdomeNode* gdome_c_replaceChild (GdomeComment *self, GdomeNode *newChild, GdomeNode *oldChild, GdomeException *exc); |
Replaces the child node oldChild with newChild in the list of children, and returns the oldChild node. If newChild is a DocumentFragment object, oldChild is replaced by all of the DocumentFragment children, which are inserted in the same order. If the newChild is already in the tree, it is first removed.
GDOME_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 put in is one of this node's ancestors or this node itself. GDOME_WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node. GDOME_NOT_FOUND_ERR: Raised if oldChild is not a child of this node. GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
GdomeNode* gdome_c_removeChild (GdomeComment *self, GdomeNode *oldChild, GdomeException *exc); |
Removes the child node indicated by oldChild from the list of children, and returns it.
GDOME_NOT_FOUND_ERR: Raised if oldChild is not a child of this node. GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
GdomeNode* gdome_c_appendChild (GdomeComment *self, GdomeNode *newChild, GdomeException *exc); |
Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed. If it is a DocumentFragment node, the entire contents of the document fragment are moved into the child list of this node
GDOME_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 append is one of this node's ancestors or this node itself. GDOME_WRONG_DOCUMENT_ERR: Raised if newChild was created from a different document than the one that created this node. GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
GdomeBoolean gdome_c_hasChildNodes (GdomeComment *self, GdomeException *exc); |
GdomeNode* gdome_c_cloneNode (GdomeComment *self, GdomeBoolean deep, GdomeException *exc); |
Makes a duplicate of this node, i.e., serves as a generic copy constructor for nodes. The duplicate node has no parent; (parentNode is NULL). GDOME_DOCUMENT_TYPE_NODE, GDOME_NOTATION_NODE and GDOME_ENTITY_NODE nodes are not supported.
GDOME_NOT_SUPPORTED_ERR: Raised if the type of node being cloned is not supported.
void gdome_c_normalize (GdomeComment *self, GdomeException *exc); |
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.
GdomeBoolean gdome_c_isSupported (GdomeComment *self, GdomeDOMString *feature, GdomeDOMString *version, GdomeException *exc); |
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node.
self : | Node Object ref |
feature : | The name of the feature to test. |
version : | This is the version number of the feature to test. In Level 2, version 1, this is the string "2.0". If the version is not specified, supporting any version of the feature will cause the method to return TRUE. |
exc : | Exception Object ref |
Returns : | TRUE if the specified feature is supported on this node, FALSE otherwise. |
GdomeDOMString* gdome_c_namespaceURI (GdomeComment *self, GdomeException *exc); |
void gdome_c_set_prefix (GdomeComment *self, GdomeDOMString *prefix, GdomeException *exc); |
Sets a new nemaspace prefix for this node.
GDOME_NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. GDOME_NAMESPACE_ERR: Raised if the specified prefix is malformed per the Namespaces in XML specification, if the namespaceURI of this node is NULL, if the specified prefix is "xml" and the namespaceURI of this node is different from "http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and the namespaceURI of this node is different from "http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of this node is "xmlns".
GdomeBoolean gdome_c_hasAttributes (GdomeComment *self, GdomeException *exc); |
void gdome_c_addEventListener (GdomeComment *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc); |
This method allows the registration of event listeners on the event target. If an EventListener is added to an EventTarget while it is processing an event, it will not be triggered by the current actions but may be triggered during a later stage of event flow, such as the bubbling phase. If multiple identical EventListeners are registered on the same EventTarget with the same parameters the duplicate instances are discarded. They do not cause the EventListener to be called twice and since they are discarded they do not need to be removed with the removeEventListener method.
self : | Node Object ref |
type : | the event type for which the user is registering |
listener : | the listener parameter takes an interface implemented by the user which contains the methods to be called when the event occurs. |
useCapture : | if TRUE, useCapture indicates that the user wishes to initiate capture. After initiating capture, all events of the specified type will be dispatched to the registered EventListener before being dispatched to any EventTargets beneath them in the tree. Events which are bubbling upward through the tree will not trigger an EventListener designated to use capture. |
exc : | Exception Object ref |
void gdome_c_removeEventListener (GdomeComment *self, GdomeDOMString *type, GdomeEventListener *listener, GdomeBoolean useCapture, GdomeException *exc); |
This method allows the removal of event listeners from the event target. If an EventListener is removed from an EventTarget while it is processing an event, it will not be triggered by the current actions. EventListeners can never be invoked after being removed. Calling removeEventListener with arguments which do not identify any currently registered EventListener on the EventTarget has no effect.
self : | Node Object ref |
type : | Specifies the event type of the EventListener being removed. |
listener : | The EventListener parameter indicates the EventListener to be removed. |
useCapture : | Specifies whether the EventListener being removed was registered as a capturing listener or not. If a listener was registered twice, one with capture and one without, each must be removed separately. Removal of a capturing listener does not affect a non-capturing version of the same listener, and vice versa. |
exc : | Exception Object ref |
GdomeBoolean gdome_c_dispatchEvent (GdomeComment *self, GdomeEvent *evt, GdomeException *exc); |
This method allows the dispatch of events into the implementations event model. Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is the EventTarget on which dispatchEvent is called.
GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not specified by initializing the event before dispatchEvent was called. Specification of the Event's type as NULL or an empty string will also trigger this exception.
void gdome_c_subTreeDispatchEvent (GdomeComment *self, GdomeEvent *evt, GdomeException *exc); |
This method allows the dispatch of events into the implementations event model. Events dispatched in this manner will have the same capturing and bubbling behavior as events dispatched directly by the implementation. The target of the event is any nodes in the subtree of the EventTarget on which dispatchEvent is called.
GDOME_UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type was not specified by initializing the event before dispatchEvent was called. Specification of the Event's type as NULL or an empty string will also trigger this exception.
GdomeBoolean gdome_c_canAppend (GdomeComment *self, GdomeNode *newChild, GdomeException *exc); |
Tests if a newChild can be added in the child list of this node.