Package edu.harvard.hul.ois.ots.schemas.XmlContent

Examples of edu.harvard.hul.ois.ots.schemas.XmlContent.XmlContent.output()


      */
      String errorText = output.getErrorMessages();
      XmlContent xml = output.getStandardXmlContent();
      if(xml != null) {
        XMLStreamWriter writer = xmlof.createXMLStreamWriter(System.out);
        xml.output(writer);
        writer.close();
      }
      System.out.println(errorText);
      System.out.println("valid = "+output.checkValid());
      System.out.println("well-formed = "+output.checkWellFormed());
View Full Code Here


      OutputStream xsltOutStream = new ByteArrayOutputStream();
     
      try {
        //send standard xml to the output stream
        XMLStreamWriter sw = xmlOutputFactory.createXMLStreamWriter(xmlOutStream);
        xml.output(sw);
       
        //convert output stream to byte array and read back in as inputstream
        Source source = new StreamSource(new ByteArrayInputStream(xmlOutStream.toByteArray()));
        Result rstream = new StreamResult(xsltOutStream);
       
View Full Code Here

    if(techmd != null && techmd.getChildren().size() > 0) {
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      XmlContent xml = getStandardXmlContent();
      if(xml != null) {
        XMLStreamWriter sw = xmlOutputFactory.createXMLStreamWriter(baos);
        xml.output(sw);
        String stdxml = baos.toString("UTF-8");
       
        //convert the std xml back to a JDOM element so we can insert it back into the fitsXml Document
        try {
          StringReader sReader = new StringReader(stdxml);
View Full Code Here

    if(xml != null) {
      xml.setRoot(true);
      XMLOutputFactory xmlof = XMLOutputFactory.newInstance();
      XMLStreamWriter writer = xmlof.createXMLStreamWriter(System.out);
     
      xml.output(writer);
    }
     
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.