Jump to content
Arbu

Removing all tags of a certain type.

Recommended Posts

I want to remove all the timestamp tags from the "My Places" file that Google Earth provides. This file is an xml file and is on my hard drive. The stamps look like "<gx:TimeStamp><when>2014-06-08T00:12:24Z</when></gx:TimeStamp>".There are 4,000 such tags, so doing it manually one by one is not an option. I can't see how I would do a search and replace on the file because that would  not remove the data in the middle.

So it seems I need to use XML Dom. I've been reading through the tutorials on W3Schools. Somehow I need to open the My Places file with the XMLHttpRequest object. How do I do that?

Thanks.

Share this post


Link to post
Share on other sites

You can use a search and replace with a regular expression, several text editors offer that.

Somehow I need to open the My Places file with the XMLHttpRequest object. How do I do that?

You can make a web page and send an ajax request for the file, but Javascript isn't going to be able to save a file on your computer.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...