docs: private static Collection<? extends WMSLayer> parseLayers(Node element) {
          final TileSystem tileSystem = org.osmdroid.views.MapView.getTileSystem();
          List<WMSLayer> rets = new ArrayList<>();
          WMSLayer ret = new WMSLayer();
  
          Double north = null;
          Double south = null;
          Double east = null;
          Double west = null;
          for (int i = 0; i < element.getChildNodes().getLength(); i++) {
              Node e = element.getChildNodes().item(i);
              String name = e.getNodeName();
              if (name.contains("Name")) {
                  ret.setName(e.getTextContent());
              } else if (name.contains("Title")) {
                  ret.setTitle(e.getTextContent());
              } else if (name.contains("Abstract")) {
                  ret.setDescription(e.getTextContent());
              } else if (name.contains("SRS")) {
                  ret.getSrs().add(e.getTextContent());
              } else if (name.contains("CRS")) {
                  ret.getSrs().add(e.getTextContent());
              } else if (name.contains("LatLonBoundingBox")) {
                  //TODO need some handling for crs here
                  south = (Double.parseDouble(e.getAttributes().getNamedItem("miny").getNodeValue()));
                  if (south < tileSystem.getMinLatitude())
                      south = tileSystem.getMinLatitude();
                  north = (Double.parseDouble(e.getAttributes().getNamedItem("maxy").getNodeValue()));
  
                  if (north > tileSystem.getMaxLatitude())
                      north = tileSystem.getMaxLatitude();
                  west = (Double.parseDouble(e.getAttributes().getNamedItem("maxx").getNodeValue()));
                  east = (Double.parseDouble(e.getAttributes().getNamedItem("minx").getNodeValue()));
                  ret.setBbox(new BoundingBox(north, east, south, west));
  
              } else if (name.contains("BoundingBox") && ret.getBbox() == null) {
                  //need to check CRS first if it's valid
                  //<BoundingBox CRS="CRS:84" minx="-179.999996" miny="-89.000000" maxx="179.999996" maxy="89.000000"/>
                  //coordinates reversed?
                  //<BoundingBox CRS="EPSG:4326" minx="-89.000000" miny="-179.999996" maxx="89.000000" maxy="179.999996"/>
                  Node crs = e.getAttributes().getNamedItem("CRS");
                  if (crs != null && crs.getAttributes() != null) {
                      Node maxx = crs.getAttributes().getNamedItem("maxx");
                      Node maxy = crs.getAttributes().getNamedItem("maxy");
                      Node miny = crs.getAttributes().getNamedItem("miny");
                      Node minx = crs.getAttributes().getNamedItem("minx");
  
                      boolean ok = maxx != null && maxy != null && minx != null && miny != null;
                      if (ok) {
                          if ("EPSG:4326".equals(crs.getNodeValue())) {
                              south = (Double.parseDouble(minx.getNodeValue()));
                              north = (Double.parseDouble(maxx.getNodeValue()));
                              west = (Double.parseDouble(maxy.getNodeValue()));
                              east = (Double.parseDouble(miny.getNodeValue()));
                              ret.setBbox(new BoundingBox(north, east, south, west));
  
                          } else if ("CRS:84".equals(crs.getNodeValue())) {
  
                              south = (Double.parseDouble(miny.getNodeValue()));
                              north = (Double.parseDouble(maxy.getNodeValue()));
                              west = (Double.parseDouble(maxx.getNodeValue()));
                              east = (Double.parseDouble(minx.getNodeValue()));
                              ret.setBbox(new BoundingBox(north, east, south, west));
                          } else {
                              Log.w(TAG, "warn, unhandled CRS/SRS " + crs.getNodeValue());
                          }
                      }
                  }
              } else if (name.contains("Style")) {
                  for (int k = 0; k < e.getChildNodes().getLength(); k++) {
                      Node e2 = e.getChildNodes().item(k);
                      if ("Name".equals(e2.getNodeName())) {
                          ret.getStyles().add(e2.getTextContent());
                      }
                  }
  
  
              } else if (name.contains("Layer")) {
                  rets.addAll(parseLayers(e));
  
              } else {
  
              }
          }
  
          Node pixelx = element.getAttributes().getNamedItem("fixedHeight");
          Node pixely = element.getAttributes().getNamedItem("fixedWidth");
          if (pixely != null && pixelx != null) {
              if (pixelx.getNodeValue().equals(pixely.getNodeValue())) {
                  ret.setPixelSize(Integer.parseInt(pixelx.getNodeValue()));
              } else {
                  Log.w(TAG, "Layer excluded due to non-equal height,width tile sizes");
                  return rets;
              }
          }   //else the image size wasn't defined,
  
          rets.add(ret);
          return rets;
      }