public void loadFromXmlStream(InputStream inputStream) { Document document; try { document = XmlUtil.newDocument(inputStream); } catch (Exception e) { throw new WikiPageLoadException("Unable to parse XML from stream", e); } Element root = document.getDocumentElement(); loadFromRootElement(root); }
public void loadFromXml(String xml) { Document document; try { document = XmlUtil.newDocument(xml); } catch (Exception e) { throw new WikiPageLoadException("Unable to parse XML from string " + xml, e); } Element root = document.getDocumentElement(); loadFromRootElement(root); }
public WikiPageProperties(Element rootElement) { this(); loadFromRootElement(rootElement); }