示例#1
0
  /**
   * Create a {@link XWikiDocument} from xml {@link Document}.
   *
   * @param domDoc the xml {@link Document}.
   * @return the {@link XWikiDocument}.
   * @throws XWikiException error when creating the {@link XWikiDocument}.
   */
  private XWikiDocument readFromXML(Document domDoc) throws XWikiException {
    XWikiDocument doc = new XWikiDocument();

    doc.fromXML(domDoc, this.withVersions);

    return doc;
  }
示例#2
0
  /**
   * Create a {@link XWikiDocument} from xml stream.
   *
   * @param is the xml stream.
   * @return the {@link XWikiDocument}.
   * @throws XWikiException error when creating the {@link XWikiDocument}.
   */
  private XWikiDocument readFromXML(InputStream is) throws XWikiException {
    XWikiDocument doc = new XWikiDocument();

    doc.fromXML(is, this.withVersions);

    return doc;
  }