if (m_descriptor == null) {
return new SourceProperty[0];
}
List properties = new ArrayList();
DOMParser parser = null;
String xml = "";
try {
parser = (DOMParser) m_manager.lookup(DOMParser.ROLE);
final String quote = "\"";
Enumeration e = m_descriptor.enumerateProperties();
while (e.hasMoreElements()) {
NodeProperty property = (NodeProperty) e.nextElement();
String name = property.getName();
String namespace = property.getNamespace();
String pre = "<"+name+" xmlns="+quote+namespace+quote+" >";
String post = "</"+name+" >";
xml = pre+property.getValue().toString()+post;
StringReader reader = new StringReader(xml);
Document doc = parser.parseDocument(new InputSource(reader));
properties.add(new SourceProperty(doc.getDocumentElement()));
}
} catch (Exception e) {
throw new SourceException("Could not parse property "+xml, e);
} finally {