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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:27:27+00:00 2026-06-02T18:27:27+00:00

I am retrieving all the coords from a gpx file, and here is a

  • 0

I am retrieving all the coords from a gpx file, and here is a sample line from that file

 <gpxx:rpt lon="11.0739613" lat="47.5691700"/>

In IE and FireFox, the following code executes correctly:

var routePoints = data.documentElement.getElementsByTagName("gpxx:rpt");

for (var i = 0; i < routePoints.length; i++) 
 {
     routePoints[i].getAttribute("lat");
     routePoints[i].getAttribute("lon");
 }

Although strangely, on Chrome this code does not work, it does not seem to retrieve any info from the DOM.

On my travels for a solution I’ve seen ‘getElementsByTagNameNS(ns,name)’ but looking at the example on http://www.w3schools.com/dom/met_element_getelementsbytagnamens.asp I haven’t managed to ascertain if that is in fact of any help to me.

Any tips appreciated

Many Thanks

David

  • 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-02T18:27:28+00:00Added an answer on June 2, 2026 at 6:27 pm

    Yes, your file is using namespaces, so you should use the namespace-aware version of this method.

    • If you know the namespace of your gpxx: prefix, then use:

      getElementsByTagNameNS(your_namespace, "rpt")

    • If your file doesn’t use any other namespaces with rpt elements, then this should be enough:

      getElementsByTagNameNS("*", "rpt")

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

Sidebar

Related Questions

I'm wondering if there is some command that can be used for retrieving all
Here total two union binding three queries, first query retrieving records from a virtual
I am retrieving all tables, and make sql. But I want something that can
Just looking for better solution.I'm retrieving all the records from mysql. Then I will
I am developing a music player app. In this I ll retrieving all the
I'm running into an odd issue retrieving printer port addresses. When I get all
I'm retrieving data from a MySQL table and displaying it on a webpage using
I am retrieving an array values from database which save multi dimensional array..i want
I'm retrieving a signed int from a SQL Server database and need to convert
I'm retrieving a set of location names from a MySQL database using PHP and

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.