How do I get the comment of the description?

37 views
Skip to first unread message

Jeffrey Backes

unread,
Apr 23, 2015, 1:20:25 AM4/23/15
to javaap...@googlegroups.com
At the top of a KML file I downloaded from google maps I get:

<?xml version='1.0' encoding='UTF-8'?>
<kml xmlns='http://www.opengis.net/kml/2.2'>
    <Document>
        <name>3. New York: Brooklyn-Queens Expressway</name>
        <description><![CDATA[Fifth Avenue may be unsurpassed for its glamour and allure, but on the "BQE" you get to see New York from a completely different perspective. Brooklyn Heights and Williamsburg, Queens, past the Brooklyn, Manhattan and Williamsburg bridges - this trip is a real adventure, with the traffic heavy and the drivers reckless. New York off the beaten tourist track.]]></description>
        <Folder>
            <name>Directions from 1-49 Parkside Avenue, Brooklyn, NY 11218, USA to Grand Central Parkway, Corona, NY 11368, USA</name>
            <Placemark>
                <name>Directions from Brooklyn, NY, United States to Queens, NY, United States</name>

Java code follows:


      kml = Kml.unmarshal(new File(path), false);
      Object feature = kml.getFeature();
      Document document = (Document) feature;


On the 5th line, how do I get the comments inside the ![CDATA[  ?  I was assuming I would set some kind of "setIgnoreComment(false) but that does not seem to be part of the API.  What am I missing/doing wrong?


jeff
Reply all
Reply to author
Forward
0 new messages