Comments in KML ?

8,796 views
Skip to first unread message

PriceCollins

unread,
Feb 15, 2006, 3:07:16 AM2/15/06
to KML Discussions
What's the format(s) for comments in KML code?

I can't seem to find a specification for that.

PriceCollins

unread,
Mar 9, 2006, 11:09:58 AM3/9/06
to KML Discussions
My question about how to code comments in KML has sat for a month with (currently) 81 reads and NO replies.

I found out the answer recently from an external source.

Answer: // at the beginning and the end of the comment. Apparently, it is not line-driven with a // at the beginning of each comment line.

I was unable to determine if there is any published documentation containing this information. If there is, where, and why is it so dfficult to find? If not, how can we use a language which is not fully documented? (Many readers note undocumented KML tags -- maybe they just can't be located.)

I would expect that the appropriate BBS sysop would scan his/her forum periodically and try to be sure that questions with zero replies get some response. As well, did none of the 81 readers have an answer?

mcshea98

unread,
Mar 9, 2006, 2:51:52 PM3/9/06
to KML Discussions
PriceCollins,

This one must have slipped through the cracks.

The method that I prefer is to use "<!-- " to start the comment and " -->" to end the comment.

I like this method for a couple reasons:
1. it can span many lines, where "//" only spans one line and must come after any code on that line.
2. It is the same method for commenting in some other applications that I use consistently.

Right click and Save this file to your desktop, then open it in a text editor. This is just an example. The code was for an older version of KML (Keyhole). So there are some better ways to accomplish the same things.

Hope this helps.
Reply all
Reply to author
Forward
0 new messages