CPListElement newArchive= new CPListElement(null, IClasspathEntry.CPE_LIBRARY, new Path(path), null);
CPListElement newArchive= new CPListElement(newLibrary, null, IClasspathEntry.CPE_LIBRARY, new Path(path), null);
		private static List loadLibraries(File file) throws IOException {			Reader reader= new FileReader(file);			Element cpElement;			try {				DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();				cpElement = parser.parse(new InputSource(reader)).getDocumentElement();			} catch (SAXException e) {				throw new IOException(PreferencesMessages.getString("UserLibraryPreferencePage.LoadSaveDialog.load.badformat")); //$NON-NLS-1$			} catch (ParserConfigurationException e) {				throw new IOException(PreferencesMessages.getString("UserLibraryPreferencePage.LoadSaveDialog.load.badformat")); //$NON-NLS-1$			} finally {				reader.close();			}						if (!cpElement.getNodeName().equalsIgnoreCase(TAG_ROOT)) {				throw new IOException(PreferencesMessages.getString("UserLibraryPreferencePage.LoadSaveDialog.load.badformat")); //$NON-NLS-1$			}			NodeList libList= cpElement.getElementsByTagName(TAG_LIBRARY);			int length = libList.getLength();						ArrayList result= new ArrayList(length);			for (int i= 0; i < length; i++) {				Node lib= libList.item(i);				if (!(lib instanceof Element)) {					continue;				}				Element libElement= (Element) lib;				String name= libElement.getAttribute(TAG_NAME);				boolean isSystem= Boolean.valueOf(libElement.getAttribute(TAG_SYSTEMLIBRARY)).booleanValue();								CPUserLibraryElement newLibrary= new CPUserLibraryElement(name, isSystem, null);				result.add(newLibrary);								NodeList archiveList= libElement.getElementsByTagName(TAG_ARCHIVE);				for (int k= 0; k < archiveList.getLength(); k++) {					Node archiveNode= archiveList.item(k);					if (!(archiveNode instanceof Element)) {						continue;					}					Element archiveElement= (Element) archiveNode;										String path= archiveElement.getAttribute(TAG_ARCHIVE_PATH);					CPListElement newArchive= new CPListElement(null, IClasspathEntry.CPE_LIBRARY, new Path(path), null);					newLibrary.add(newArchive);										if (archiveElement.hasAttribute(TAG_SOURCEATTACHMENT)) {						IPath sourceAttach= new Path(archiveElement.getAttribute(TAG_SOURCEATTACHMENT));						newArchive.setAttribute(CPListElement.SOURCEATTACHMENT, sourceAttach);					}					if (archiveElement.hasAttribute(TAG_JAVADOC)) {						try {							URL javadoc= new URL(archiveElement.getAttribute(TAG_JAVADOC));							newArchive.setAttribute(CPListElement.JAVADOC, javadoc);						} catch (MalformedURLException e) {							// ignore						}					}				}			}			return result;		}