parse method

void parse()

Parse the SLD xml.

Implementation

void parse() {
  var root = document.findElements(STYLEDLAYERDESCRIPTOR, namespace: DEF_NSP);
  if (root.isEmpty) {
    throw ArgumentError("The file doesn't seem to be an SLD file.");
  } else {
    var featureTypeStyleList =
        document.findAllElements(FEATURETYPESTYLE, namespace: DEF_NSP);
    // we read just the first
    int index = 0;
    for (var featureTypeStyle in featureTypeStyleList) {
      FeatureTypeStyle fts = FeatureTypeStyle(index++, featureTypeStyle);
      featureTypeStyles.add(fts);
    }
  }
}