Use XPath to perform uncarded searches through MSXML

xiaoxiao2021-03-06  40

According to the name "mydomain1.com"

DomainName properties Execute uncarded searches for the following XML data

mydomain1.com

The syntax of Translate in MSXML 3.0 is as follows:

Oxml.SetProperty "SelectionLanguage", "XPath"

Set node = oxml.selectsinglenode ("Domains / DomainName" (., 'AbcdefghijklmnopqrStuvwxyz', 'AbcdefghijklmnopqrStuvwxyz') = 'mydomain1.com'] ")

MSXML 4.0 MS: String-Compare syntax is as follows:

'To use msxml 4.0, you need to use 4.0 dependent progid expedition.

'...

'Set the select namespace for xmlns: ms

Oxml.SetProperty "SelectionNameSpaces", "XMLns: MS = 'URN: Schemas-Microsoft-COM: XSLT'"

Set node = oxml.selectsinglenode ("Domains / DomainName [MS: String-Compare (., 'mydomain1.com', 'en-us', 'i') = 0]")

reference

related

TRANSLATE and

For more information on the String-Compare function, see the "XML Software Development Kit" (SDK) document.

转载请注明原文地址:https://www.9cbs.com/read-76463.html

New Post(0)