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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:40:05+00:00 2026-06-14T15:40:05+00:00

I have an XML : <computers> <computer> <description>Description</description> <computer.always></computer.always> </computer> </computers> So i want

  • 0

I have an XML :

<computers>
  <computer>
    <description>Description</description>
    <computer.always></computer.always>
  </computer>
</computers>

So i want to access the computer.always element, so I use this :

$(xml).find('computer ' + "computer.always".replace(/\./g,'\\\\.'))

And the element is not found.
( I wrote “computer.always”.replace(/./g,’\\.’) because “computer.always” can be a variable and i need to make this selector dynamic. )

The weird thing is :

When I do :

$(xml).find('computer computer\\.always') // Element found

My element is find.

But when I use the result of “computer.always”.replace(/./g,’\\.’), it fails.

"computer.always".replace(/\./g,'\\\\.') // return "computer computer\\.always" in the console
 $(xml).find("computer.always".replace(/\./g,'\\\\.')) => []

Anyone can help me?

  • 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-14T15:40:06+00:00Added an answer on June 14, 2026 at 3:40 pm

    In fact, my error was to use double \, so the console use it to echo but not my code. My solution was to use :

    $(xml).find("computer.always".replace(/\./g,'\\.'))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this XML : <computers> <computer sid=1353323295303> <description>TEST</description> <match.country result=match value=FR EU> <match.country
I have a number of ~10MB xml files on a local computer. For each
I have XML in the following form that I want to parse with PHP
I Have XML similar to this(omitted parts for brevity): <uformrecord> <state>Submitted</state> <created>2012-06-19T11:31:54</created> <updated>2012-06-19T11:32:13</updated> <id>53225sas3c1-d727-42cd-93a6-97cd778e5ee9</id>
I have xml like this: <rule> <word>I</word> <word>need</word> <word>more</word> <marker> <word>money</word> </marker> <word>now</word> </rule>
I have XML that looks like this: <Parameter Name=parameter name Value=parameter value /> which
I have xml like this: <configurationData> <path name='b'> <path name='a'> <setting name='s1'> ![CDATA[XXXX]] </setting>
I have what should be a fairly simple requirement. I want to use LINQ
I have get an xml file from a WebService <MasterProducts> <MasterProduct> <Productcode>023DDC</Productcode> <Description>Dell CRT
I have a puzzling problem: this seemingly simple page doesn't work in IE9: <?xml

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.