CustomXMLNode.SelectSingleNode Method
Selects a single node from a collection matching an XPath expression. This method differs from the CustomXMLPart.SelectSingleNode method in that the XPath expression will be evaluated starting with the 'expression' node as the context node.
Note
|
|---|
| References to DTDs from custom XML parts are not supported. DTD references in custom XML parts will not resolve, and custom XML parts containing DTD references generate an exception when an attempt is made to save the file's content to a flat XML file. |
Syntax
expression.SelectSingleNode(XPath)
expression An expression that returns a CustomXMLNode object.
Parameters
| Name | Required/Optional | Data Type | Description |
|---|---|---|---|
| XPath | Required | String | Contains an XPath expression. |
Return Value
CustomXMLNode
Remarks
The prefix mappings for the XPath expression are retrieved from the NamespaceManager property.
Example
The following example demonstrates adding a custom XML part, selecting a part with a namespace URI, and then selecting a node within that part that matches an XPath expression.
| Visual Basic for Applications |
|---|
|
Note