Class MCRDOMContent


public class MCRDOMContent extends MCRXMLContent
Reads MCRContent from a W3C DOM XML document.
Author:
Frank Lützenkichen
  • Constructor Details

    • MCRDOMContent

      public MCRDOMContent(Document dom)
      Parameters:
      dom - the W3C DOM XML document to read from
  • Method Details

    • getSource

      public Source getSource()
      Description copied from class: MCRContent
      Return the content as Source
      Overrides:
      getSource in class MCRContent
      Returns:
      content as Source
    • sendTo

      public void sendTo(OutputStream out) throws IOException
      Description copied from class: MCRContent
      Sends content to the given OutputStream. The OutputStream is NOT automatically closed afterwards.
      Overrides:
      sendTo in class MCRContent
      Parameters:
      out - the OutputStream to write the content to
      Throws:
      IOException
    • asXML

      public Document asXML() throws JDOMException
      Description copied from class: MCRContent
      Parses content, assuming it is XML, and returns the parsed document.
      Overrides:
      asXML in class MCRContent
      Returns:
      the XML document parsed from content
      Throws:
      JDOMException