/** * Load properties from XML document. */ public void loadFromDocument(Document doc) throws PropertyImplementationException { try { NodeList nodeList = XMLUtils.xpathList(doc, "/property-set/property"); for (int i = 0; i < nodeList.getLength(); i++) { Element e = (Element) nodeList.item(i); String key = e.getAttribute("key"); int type = type(e.getAttribute("type")); Object value = loadValue(e, key, type); if (value != null) { setImpl(type, key, value); } } } catch (TransformerException e) { throw new PropertyImplementationException(e); } }
NodeList pElements = XMLUtils.xpathList(e, "properties/property");