Question

Writing ampersand to KML

  • 5 September 2022
  • 2 replies
  • 5 views

Badge +2

When writing a KML-file all characters with '&' are written as '& '

This also happens with '<' and '>' which will be exported as '&lt;' and '&gt;'

 

This is the result

<SimpleData name="sign">Electrical &amp; hydrogene</SimpleData>

But i need

<SimpleData name="sign">Electrical & hydrogene</SimpleData>

Is that possible?


2 replies

Userlevel 5
Badge +25

Not within the KML file itself as those are special characters (so they're HTML encoded). However, Google Earth should render that properly.

Badge +2

Thanks Hans,

I found this exception here

https://www.w3.org/standards/xml/core

Only for <, >, &, " and '

Reply