Parameter | Description |
---|---|
sNamespaceURI | Namespace-URI string (e.g. http://dataaccess.com/MyURI) |
sBaseName | Name of Element excluding the prefix |
Returns true if the node is an element and the element's NamespaceURI and BaseName matches the passed values
Function IsElementNS string sNamespaceURI string sBaseName Returns Boolean
Call: | Get IsElementNS sNamespaceURI sBaseName to BooleanVariable |
This function is used to search for an xml element by NamespaceURI and BaseName. If the node is an element, it checks to see if the node's psBaseName and psNamespaceURI matches the passed sBaseName sNamespaceURI.
Move "http://www.dataaccess.com/Test/CustomerList" to sNS // the namespace Get DocumentElement of hoXML to hoRoot Get FirstChild of hoXml to hoNode While hoNode Get IsElementNS of hoNode sNS "customer" to bIsCust If bIsCust begin Send HandleCustomerNode hoNode end Get NextNode of hoNode to hoNode end
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.
Note: | When parsing XML documents with namespaces you should always search by NamespaceURI and BaseName. You should not use the element's prefix and you should not attempt to ignore the NamespaceURI. |
ChildElementNS | ChildElementValueNS | NextElementNS | psBaseName | psNamespaceURI | psPrefix