Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8235337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:46:20+00:00 2026-06-07T18:46:20+00:00

For example: Set objXML = CreateObject(Microsoft.XMLDOM) objXML.async = False objXML.validateOnParse = False objXML.resolveExternals =

  • 0

For example:

Set objXML = CreateObject("Microsoft.XMLDOM")

objXML.async = False
objXML.validateOnParse = False
objXML.resolveExternals = False
objXML.load("http://www.w3schools.com/dom/books.xml")

'objXML.setProperty "SelectionLanguage", "XPath"

For Each x In objXML.selectNodes("//book[@category='cooking' and @category='children']")
    WScript.Echo x.text
Next

For Each y In objXML.selectNodes("//book[position()<3]")
    WScript.Echo y.text
Next

When objXML.setProperty "SelectionLanguage", "XPath" is commented then first xpath expression (x object) is returned valid but second xpath expression (y object) raises error:

msxml3.dll (14, 1) : Unknown method.

//book[-->position()<--<3]

If I uncomment objXML.setProperty "SelectionLanguage", "XPath" both expressions work.

My question is when XPath property has to be explicitly set, or what kind of expressions are executed without setting this property?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T18:46:23+00:00Added an answer on June 7, 2026 at 6:46 pm

    Default language is not XPath for older versions of MSXML.
    You’ve created DomDocument instance using an old, “version independent ProgID”. Microsoft.XMLDOM corresponds MSXML 3.0 (if you have) as the last version of MSXML which supported independent ProgIDs.
    You can determine default selection language like this :

    WScript.Echo objXML.getProperty("SelectionLanguage")
    

    Must be return XSLPattern which a selection language does not supports methods like position().
    XPath is default selection language for MSXML 4.0 and later, so you have two choices using XPath properly.

    1. Using older versions specifying selection language as XPath.
    2. Using newer (less older?) versions without specifyng any selection language

    From an ancient article that smells like my teenage times describing the difference between XSL Patterns and XPath.

    MSXML 2.0 provides support for XSL Patterns, the precursor to XPath
    1.0. The notion of an XML addressing language was introduced into the original W3C XSL Working Drafts
    (http://www.w3.org/TR/1998/WD-xsl-19981216.html) and called XSL
    Patterns. MSXML 2.0 implements the XSL Patterns language as described
    in the original XSL specification with a few minor exceptions
    .

    So, I think you were on minor (!) exceptions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of urls for example http://t3.gstatic.com/images?q=tbn:ANd9GcRfLZhH0jpyUJxGtsiHcldUPiNQsosLdR9xgcYqVWyRWGYS4qtt http://feeds.feedburner.com/~r/DrudgeReportFeed/~4/zSLWG4ybmjw I want to remove
i'm trying to get the following example set up on my computer: http://deluxe-menu.com/popup-mode-sample.html I've
I've set up an example which illustrates my issue: http://jsfiddle.net/XZeYK/5/ If you view this
For example I have site http://localhost/site In IIS I set that 404 error causes
im trying to trigger a load event (for example set default value) on my
I have a image (png file) with opacity 35%, i want for example: Set
Given this example data set: ----------------------------- | item | date | val | -----------------------------
I set up the Dungeons InAppBilling example locally and I am ready to try
I've set up a very simple example with LINQ-TO-SQL in WPF. I can get
I set up event listener, for example: setOnClickListener like this Button stopBtn = (Button)findViewById(R.id.stop);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.