@Override
	public void readFromXML(final InputStream is) throws IOException {
		DocumentBuilder docBuilder = null;
		try {
			docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
		} catch (final ParserConfigurationException pce) {
			throw new IOException(pce);
		}

		Document document = null;
		try {
			document = docBuilder.parse(is);
		} catch (final SAXException e) {
			throw new IOException(e);
		}

		final NodeList parameters = document.getElementsByTagName(PARAMETER);
		for (int i = 0; i < parameters.getLength(); i++) {
			final Element parameter = (Element) parameters.item(i);
			final String parameterID = parameter.getAttribute(PARAMETER_ID_ATTRIB);
			final NodeList parameterEntries = parameter.getElementsByTagName(PARAMETER_ENTRY);
			for (int j = 0; j < parameterEntries.getLength(); j++) {
				final Element parameterEntry = (Element) parameterEntries.item(j);
				final String neighbor = parameterEntry.getAttribute(PARAMETER_NEIGHBOR_ATTRIB);
				final String distance = parameterEntry.getAttribute(PARAMETER_DISTANCE_ATTRIB);
				final String optional = parameterEntry.getAttribute(OPTIONAL_ENTRY);
				// By default entries are not optional
				try {
					if (optional.isEmpty() || optional.equals("false"))
						addEntry(ParameterFactory.createParameter(parameterID, taxonomy), new EstimatedDistance(Integer.parseInt(distance), new PeerID(neighbor), false));
					else
						addEntry(ParameterFactory.createParameter(parameterID, taxonomy), new EstimatedDistance(Integer.parseInt(distance), new PeerID(neighbor), true));
				} catch (final InvalidParameterIDException ie) {
					throw new IOException(ie);
				}
			}
		}
	}