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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:03:32+00:00 2026-05-25T12:03:32+00:00

I am trying to make a map marker using this demo link http://code.google.com/apis/kml/articles/phpmysqlkml.html but,

  • 0

I am trying to make a map marker using this demo link

http://code.google.com/apis/kml/articles/phpmysqlkml.html

but, i get fatal error here on the line

$dom = new DOMDocument('1.0', 'UTF-8'); // Creates the root KML element and appends it to the root document. 
$node = $dom->createElementNS('http://earth.google.com/kml/2.1', 'kml');
$parNode = $dom->appendChild($node);

The script doesn’t seems to work
when i use NS, it tries to save the document and when i remove NS, i get the error as

**( ! ) Fatal error: Uncaught exception ‘DOMException’ with message ‘Invalid Character Error’ in C:\wamp\www\googlemap\phpsql_genkml.php on line 33
( ! ) DOMException: Invalid Character Error in C:\wamp\www\googlemap\phpsql_genkml.php on line 33
Call Stack

Time Memory Function Location

1 0.0012 412392 {main}( ) ..\phpsql_genkml.php:0
2 0.0066 422136 DOMDocument->createElement( ) ..\phpsql_genkml.php:33**

  • 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-25T12:03:32+00:00Added an answer on May 25, 2026 at 12:03 pm

    You cannot remove the NS in createElementNS.
    When you do it createElement tries to create an element with the tagName “http://earth.google.com/kml/2.1″(I think I don’t need to explain what invalid characters are there). The tagtName has to be kml

    How do you use this generated KML in Google-Maps, who tries to save anything?

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

Sidebar

Related Questions

I am trying to make this map only allow one marker on the page
I'm trying to make a Google map that updates a marker as a user's
I'm using the Google Maps API V3 and I'm trying to make a marker
I'm trying to make a map that doesn't wrap horizontally, using the Google Maps
I'm trying to make any of the following mappings work to map http://mysite.org/add?http://sitetoadd.com or
I'm trying to make a homepage on my mobile website where a google map
I am trying to make a map with shiftzoom.js I have the following code
I am trying to make a topographic map using different density points for density
I am trying to make simple google map Application in android. my Apps. is
I'm trying to add markers to a map on my page using Google's Javascript

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.