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

  • SEARCH
  • Home
  • 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 6530389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:44:57+00:00 2026-05-25T09:44:57+00:00

Going through the XPath.compile API, I was under the impression that it would return

  • 0

Going through the XPath.compile API, I was under the impression that it would return a valid XPathExpression or throw.

Indeed, it doesn’t make sense that any compiler would return an object that is not ‘runnable’.

Therefore I was a little surprised that a valid XPathExpression could still throw when evaluateing a document, especially since according to it’s description,

XPathExpressionException represents an error in an XPath expression

Does that make sense? Can a compiled expression still have an error?

  • 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-05-25T09:44:58+00:00Added an answer on May 25, 2026 at 9:44 am

    A static error in an XPath expression (for example incorrect XPath syntax, or a reference to an undefined function, variable, or namespace) will throw an error from the compile() method.

    A dynamic error in an XPath expression will throw an exception from the evaluate() method.

    XPath 1.0 is designed to have very few dynamic errors. An example of one would be count(3), which is an error because count() can only be applied to a node-set. In XPath 2.0 there are many more dynamic errors possible.

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

Sidebar

Related Questions

Going through the php.net site, it had an example for header, which says would
While going through MSDN I found that in button properties useSubmitBeheviour there is written
While going through one project, I have seen that the memory data is 8
After going through some examples on the web I realize that there is a
I'm going through Bitbucket and I can't seem to find any Mercurial repositories that
When going through some sample code, notice that setting the main Window Title in
While going through one of our own projects, that other developer used rand() to
When going through some of my applications in the past, I have noticed that
I'm going through an XML file of articles and the journalist(s) that wrote them.
While going through features of .NET framework 4.5, I found that it supports RFC-compliant

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.