use of org.jdom2.output.DOMOutputter in project mycore by MyCoRe-Org.
the class MCRXMLFunctions method resolve.
/**
* @param uri the uri to resolve
*/
public static NodeList resolve(String uri) throws JDOMException {
org.jdom2.Element element = MCRURIResolver.instance().resolve(uri);
element.detach();
org.jdom2.Document document = new org.jdom2.Document(element);
return new DOMOutputter().output(document).getDocumentElement().getChildNodes();
}
use of org.jdom2.output.DOMOutputter in project mycore by MyCoRe-Org.
the class MCRXMLFunctions method document.
public static Node document(String uri) throws JDOMException, IOException, SAXException, TransformerException {
MCRSourceContent sourceContent = MCRSourceContent.getInstance(uri);
if (sourceContent == null) {
throw new TransformerException("Could not load document: " + uri);
}
DOMOutputter out = new DOMOutputter();
return out.output(sourceContent.asXML());
}
Aggregations