private void parseFieldMappings(NodeList nl) {
	for (int i=0; i<nl.getLength(); i++) {
	    Node node = nl.item(i);
	    NamedNodeMap attr = node.getAttributes();
	    String fieldName = attr.getNamedItem("name").getNodeValue();
	    NodeList children = node.getChildNodes();
	    for (int j=0; j<children.getLength(); j++) {
		Node t = children.item(j);
		if (t.getNodeType() == Node.TEXT_NODE
		    || t.getNodeType() == Node.COMMENT_NODE)
		    continue;
		Mapping newMapping;
		switch (t.getNodeName()) {
		    case "xpath":
			newMapping = new XpathMapping(xpath, t.getTextContent());
			break;
		    case "string":
			NamedNodeMap attr2 = t.getAttributes();
			Node expNode = attr2.getNamedItem("expand");
			boolean expand;
			if (expNode == null) {
			    expand = false;
			} else {
			    expand = Boolean.valueOf(expNode.getNodeValue());
			}
			newMapping = new StringMapping(t.getTextContent(),
				expand ? config : null);
			break;
		    default:
			logger.info("Unsure how to handle element '"
				+ t.getNodeName() + "', skipping.");
			continue;
		}

		logger.debug("Adding "+fieldName);
		List<Mapping> mapList = mappings.get(fieldName);
		if (mapList == null) {
		    mapList = new ArrayList<>();
		    mappings.put(fieldName, mapList);
		}
		mapList.add(newMapping);
	    }
	}
    }