cpElement = parser.parse(new InputSource(reader)).getDocumentElement();
cpElement = parser.parse(inputSource).getDocumentElement();
	private static void loadFromStream(Reader reader) throws CoreException {		Element cpElement;		try {			DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();			cpElement = parser.parse(new InputSource(reader)).getDocumentElement();		} catch (SAXException e) {			throw createException(e, CorextMessages.getString("JavaDocLocations.error.readXML")); //$NON-NLS-1$		} catch (ParserConfigurationException e) {			throw createException(e, CorextMessages.getString("JavaDocLocations.error.readXML")); //$NON-NLS-1$		} catch (IOException e) {			throw createException(e, CorextMessages.getString("JavaDocLocations.error.readXML")); //$NON-NLS-1$		}				if (cpElement == null) return;		if (!cpElement.getNodeName().equalsIgnoreCase(NODE_ROOT)) {			return;		}		NodeList list= cpElement.getChildNodes();		int length= list.getLength();		for (int i= 0; i < length; ++i) {			Node node= list.item(i);			short type= node.getNodeType();			if (type == Node.ELEMENT_NODE) {				Element element= (Element) node;				if (element.getNodeName().equalsIgnoreCase(NODE_ENTRY)) {					String varPath = element.getAttribute(NODE_PATH);					String varURL = element.getAttribute(NODE_URL);					try {						setJavadocBaseLocation(new Path(varPath), new URL(varURL), false);					} catch (MalformedURLException e) {						throw createException(e, CorextMessages.getString("JavaDocLocations.error.readXML")); //$NON-NLS-1$					}				}			}		}	}	