/* nothing - try something else*/
}
}
// Parse as a generic XML document.
SAXDocumentFactory sdf;
if (doc != null) {
sdf = new SAXDocumentFactory
(doc.getImplementation(),
XMLResourceDescriptor.getXMLParserClassName());
} else {
sdf = new SAXDocumentFactory
(new GenericDOMImplementation(),
XMLResourceDescriptor.getXMLParserClassName());
}
try {
Document d = sdf.createDocument(uri, new StringReader(text));
if (doc == null)
return d;
Node result = doc.createDocumentFragment();
result.appendChild(doc.importNode(d.getDocumentElement(),