ArrayList<MapViewerConfigs> mapViewerConfigs =
new ArrayList<MapViewerConfigs>();
nodes = (NodeList) xpath.evaluate("catalog/mapViewer/instance", root,
XPathConstants.NODESET);
for (int j = 0; nodes != null && j < nodes.getLength(); j++) {
MapViewerConfigs mvConfigs = new MapViewerConfigs();
Node nd = nodes.item(j);
mvConfigs.setClassName(Val.chkStr(xpath.evaluate("@className", nd),"com.esri.gpt.catalog.search.MapViewerFlex"));
mvConfigs.setUrl(xpath.evaluate("@url", nd));
NodeList pNodeList = (NodeList) xpath.evaluate("parameter", nd, XPathConstants.NODESET);
for (int k = 0; pNodeList != null && k < pNodeList.getLength(); k++) {
String key = xpath.evaluate("@key", pNodeList.item(k));
String value = xpath.evaluate("@value", pNodeList.item(k));
if (key != null || value != null) {
mvConfigs.addParameter(key, value);
}
}
mapViewerConfigs.add(mvConfigs);
}