String contentXml = element.getContentXml();
URL contentURL = null;
restorePath = element.getRestorePath();
if (contentXml != null) {
parserInput = new ParserInput(contentXml, element.getHref());
return;
}
// The input was not an XML string, find the content URL
Bundle bundle = null;
if(element != null && element.getConfigurationElement() != null)
try{
String pluginId = element.getConfigurationElement().getContributor().getName();
bundle = Platform.getBundle(pluginId);
} catch (Exception e) {
// do nothing
}
if (bundle != null) {
contentURL = FileLocator.find(bundle, new Path(element.getContentFile()), null);
}
if (contentURL == null) {
try {
contentURL = new URL(element.getHref());
} catch (MalformedURLException mue) {
}
}
parserInput = new ParserInput(contentURL, bundle != null ? bundle.getSymbolicName() : null);
}