private org.w3c.dom.Document asInputW3cDocument(final List<QuickObject> items)
      throws JDOMException {
    final Document jdomDoc = asInputDocument(items);

    final DOMOutputter domOutputter = new DOMOutputter();
    return domOutputter.output(jdomDoc);
  }
예제 #2
0
 /**
  * Creates a W3C DOM document for the given WireFeed.
  *
  * <p>This method does not use the feed encoding property.
  *
  * <p>NOTE: This method delages to the 'Document WireFeedOutput#outputJDom(WireFeed)'.
  *
  * <p>
  *
  * @param feed Abstract feed to create W3C DOM document from. The type of the WireFeed must match
  *     the type given to the FeedOuptut constructor.
  * @return the W3C DOM document for the given WireFeed.
  * @throws IllegalArgumentException thrown if the feed type of the WireFeedOutput and WireFeed
  *     don't match.
  * @throws FeedException thrown if the W3C DOM document for the feed could not be created.
  */
 public org.w3c.dom.Document outputW3CDom(final WireFeed feed)
     throws IllegalArgumentException, FeedException {
   final Document doc = outputJDom(feed, false);
   final DOMOutputter outputter = new DOMOutputter();
   try {
     return outputter.output(doc);
   } catch (final JDOMException jdomEx) {
     throw new FeedException("Could not create DOM", jdomEx);
   }
 }