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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:45:23+00:00 2026-05-20T02:45:23+00:00

I have a very simple XML document that I’ve retrieved from a larger parent.

  • 0

I have a very simple XML document that I’ve retrieved from a larger parent. See ‘accountxml’ below:

<accounts xmlns=​"https:​/​/​domain.com/path">​
    <customerid>​sometext</customerid>​
    <login>​sometext​</login>​
    <companyname>​sometext​</companyname>​
    <canmanageclients>​sometext</canmanageclients>​
</accounts>​

Simple enough – just one namespace URL (the URL referred to as ns2 in myNS namespace map below). Querying login:

accountxml.evaluate('//ns2:login',accountxml,myNS,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;

returns OK:

<login>sometext</login>​

But:

accountxml.evaluate('//ns2:customerid',accountxml,myNS,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;

Returns:

null

This is such a simple query I’m surprised it breaks. But I can reproduce it 100% of the time. Am I doing something wrong, or is this a bug in Chrome?

  • 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-20T02:45:24+00:00Added an answer on May 20, 2026 at 2:45 am

    Thanks to Gael for encouraging me to look at capitalization again.

    The key to this is the document is taken from a larger parent. Although the small document above is printed exactly as the JS console sees it – with all element names in lower case, the larger parent it is taken from uses initialLowerCase for the element names.

    Even though I’m querying the smaller fragment, I still need to use the casing of the parent rather than the casing of the child.

    accountxml.evaluate('//ns2:customerId',accountxml,myNS,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;
    

    I’m not sure if this is a Chrome bug or an expected behavior.

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

Sidebar

Related Questions

i have very simple problem. I need to create model, that represent element of
I have very simple select like this: SELECT * FROM table WHERE column1 IN
I have a very simple bit of script that changes the status of an
I have a very simple Java RMI Server that looks like the following: import
I have a very simple ASP.Net page that acts as a front end for
I'm trying to unmarshal a simple xml document from a public api from Convio.
We have an XML file with a very simple implementation of XLink : <root
I have a very simple XML: <Rows> <Row> <id>1</id> <name>foo</name> <more>xyz</more> </Row> <Row> <id>2</id>
I have a very simple Android activity layout like this: <?xml version=1.0 encoding=utf-8?> <LinearLayout
I have a very simple .NET commandline application that I want to port to

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.