This project has moved. For the latest updates, please go here.

the <fill> and the <outline> in the <PolyStyle> are serialized as true, instead of 1.

Feb 12, 2013 at 10:51 PM
Since both Fill and Outline are boolean, it is correct to be serialized as true or false. But my consumer application (from external company) expects me to return 1 or 0. Is there a way to do this? see the serialized KML below...

<Style id="drawing1">
<LineStyle>
  <color>ff00ff00</color>
  <width>3</width>
</LineStyle>
<PolyStyle>
  <color>410000ff</color>
  <fill>true</fill>
  <outline>true</outline>
</PolyStyle>
</Style>
Coordinator
Feb 13, 2013 at 12:24 PM
Those properties are defined in the standard as having the type xsd:boolean, which according to the XML Schema Part 2 spec can be true, false, 1, 0 so the serialized Kml is valid.

However, I understand that it doesn't matter if you produce standard compliant documents if the other program doesn't understand them :) If you take a look at Base/KmlFormatter.cs file you'll see there is a method called GetBool - you can modify the string literals here to return 1 or 0 as required.
Feb 14, 2013 at 5:24 PM
Thank you.