/** * Creates a new default Kml Style with a specified ID (given as an attribute value in the start * tag) and assigns specific elements read from the XmlPullParser to the Style. A new style is not * created if it does not have an ID. */ private static void setContainerStyle( XmlPullParser parser, HashMap<String, KmlStyle> containerStyles) throws XmlPullParserException, IOException { if (parser.getAttributeValue(null, "id") != null) { KmlStyle style = KmlStyleParser.createStyle(parser); String styleId = style.getStyleId(); containerStyles.put(styleId, style); } }