MIXmlSelectSingleNode() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Applies the specified pattern-matching operation to this node's context and returns the first matching node as an MIXmlNode object.

Syntax

MIXmlSelectSingleNode( ByVal hXMLNode As MIXmlNode, 
						ByVal strPattern As String ) As MIXmlNode

hXMLNode is the MIXmlNode object handle.

strPattern is a string specifying an XPath expression.

Return Value

A handle to the MIXmlNode object. Returns the first node that matches the given pattern-matching operation. If no nodes match the expression, returns a NULL value.

Description

MIXmlSelectSingleNode() gets a handle to an MIXmlNode object that is the first matching node with the given pattern-matching operation. It returns NULL if no child exists. MIXmlSelectSingleNode() is similar to the MIXmlSelectNodes() function, but returns the first matching node rather than a list of all the matching nodes.

The caller has to dispose of the handle by calling the MIXmlNodeDestroy() procedure when the handle is no longer in use.

See Also

MIXmlNodeDestroy() procedure, MIXmlSelectNodes() function