// get all organization elements. need to set namespace
rootElement = doc.getRootElement();
String nsuri = rootElement.getNamespace().getURI();
nsuris.put( "ns", nsuri);
XPath meta = rootElement.createXPath("//ns:organization");
meta.setNamespaceURIs(nsuris);
Element orgaEl = (Element) meta.selectSingleNode(rootElement); // TODO: accept several organizations?
if (orgaEl == null) throw new AssertException("could not find element organization");
XPath metares = rootElement.createXPath("//ns:resources");
metares.setNamespaceURIs(nsuris);
Element elResources = (Element) metares.selectSingleNode(rootElement);
if (elResources == null) throw new AssertException("could not find element resources");
List resourcesList = elResources.elements("resource");
resources = new HashMap(resourcesList.size());
for (Iterator iter = resourcesList.iterator(); iter.hasNext();) {