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 6341475
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:02:33+00:00 2026-05-24T20:02:33+00:00

Some of the nodes in an XML document have namespaces, specified with a defined

  • 0

Some of the nodes in an XML document have namespaces, specified with a defined prefix.

It is possible to specify local-name() in XPath 1.0 and so ignore namespaces.

However, I want to enable the writer of the XPath to find nodes using their full namespace-qualified name as an identifier.

The recommended way is to add namespace declarations in the invoking code (in my case, Java). But this means that the person writing Xpath does not have the ability to work with namespaces!

How do we find nodes by their fully qualified names using pure XPath?

  • 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-24T20:02:34+00:00Added an answer on May 24, 2026 at 8:02 pm

    Not sure what you meant by “as an identifier”.

    How do we find nodes by their fully qualified names using pure XPath?

    In XPath 1.0, by using local-name() and namespace-uri(), e.g.

    "*[local-name() = 'foo' and namespace-uri() = 'http://my.org/ns/2.0']"
    

    In XPath 2.0, there is a richer set of functions related to namespaces, e.g. namespace-uri-from-QName(). But I’m not sure they improve on the above for what you want.

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

Sidebar

Related Questions

I have an XML document with some nodes like <node name=xxx id=xxx> Can I
I want to append some nodes to an xml document using Linq2XML. The file
I have got an XML document and trying to get the number of nodes
I have some XML where I would like to remove identical consecutive child nodes,
I have a standard XML document, which looks like a 'tree'. I add some
i have an xml document structured like this: <NewDataSet> <videos> <video> <name>name of video</name>
I have an XML document that I want to generate unique IDs for. Some
I'm adding nodes to my XML document as part some in-house processing, but cannot
I need some help. I have this xml document: <?xml version="1.0" encoding="utf-8"?> <MyItems> <Parent
I have an XML document that have additonal nodes in it at different levels

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.