boolean end = false;
while (reader.hasNext() && !end) {
Integer eventType = reader.next();
if (eventType.equals(XMLEvent.START_ELEMENT)) {
String name = reader.getLocalName();
WorkspacePersistenceProvider pp = PersistenceProviderUtils.getXMLPersistenceProviders().get(name);
if (pp != null) {
currentProvider = pp;
try {
pp.readXML(reader, workspace);
} catch (UnsupportedOperationException e) {
}
}
} else if (eventType.equals(XMLStreamReader.END_ELEMENT)) {
if ("workspace".equalsIgnoreCase(reader.getLocalName())) {