RemoveQualifiedNode - cXMLDOMNamedNodeMap
Removes an attribute node that matches the NamespaceURI and Basename and returns the removed node's handle
Type: Function
Return Data Type: Handle
Parameters
| Parameter | Type | Description |
|---|---|---|
| sNameSpace | String | The attribute NamespaceURI |
| sBaseName | String | the name of the attribute node |
Syntax
Function RemoveQualifiedNode String sNameSpace String sBaseName Returns Handle
Call Example
Get RemoveQualifiedNode sNameSpace sBaseName to HandleVariable
Description
RemoveQualifiedNode removes a named node (NamespaceURI and BaseName) from an attribute list and returns the removed node. You must destroy the attribute node.
move "http://www.dataaccess.com/Test/CustomerList" to sNS
get AttributeNodes of hoEle to hoNamedNodeList
if hoNamedNodeList begin
get RemoveQualifiedNode of hoNamedNodeList sNS "Type" to hoAttr
if (hoAttr=0) send Stop_Box "attribute not found"
else send Destroy of hoAttr
send Destroy of hoNamedNodeList
end
Namespaces
This message removes a node in a document that is namespace aware. This requires that you always pass a NameSpaceURI. It is suggested that you always create documents using namespace methods (the methods that end in NS) and that you no longer use the non-namespace methods.
If your document does not have any namespaces or an element within the document does not have a namespace, its namespace is considered to be global and its NamespaceURI is represented as an empty string (""). In such a case you can and should use these namespace aware messages passing an empty string for the NameSpaceURI.
Attributes and Namespaces
Attributes are less likely to use namespaces (i.e., they are more likely to use the global namespace) which means you will often be passing the "" NamespaceURI string.Attributes never use the default namespace (xmlns="xx"). If the attribute does not have a prefix, it is in the global namespace.A Prefix will get added to the attribute name by adding the prefix to the sName (e.g., sName="m:table").
See Also
Return Value
Returns the object handle of the removed node, zero if no node is removed.