Examples of DOMWriter


Examples of org.dom4j.io.DOMWriter

            try
            {
                handler.write(null, bos);
                org.dom4j.Document dom4jDoc = null;
                dom4jDoc = DocumentHelper.parseText((String)expected);
                expected = new DOMWriter().write(dom4jDoc);
                dom4jDoc = DocumentHelper.parseText(new String(bos.toByteArray(), "UTF-8"));
                result = new DOMWriter().write(dom4jDoc);
            }
            catch (Exception e)
            {
                fail();
            }
View Full Code Here

Examples of org.dom4j.io.DOMWriter

    @Override
    protected void doSetUp() throws Exception
    {
        srcData = IOUtils.getResourceAsString("cdcatalog.xml", getClass());
        org.dom4j.Document dom4jDoc = DocumentHelper.parseText(srcData);
        resultData = new DOMWriter().write(dom4jDoc);
    }
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.contentmodel.util.DOMWriter

    contentBuilder.createDefaultRootContent(cmDocument, cmElementDeclaration, namespaceInfoList);

    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream, charset);

    DOMWriter domWriter = new DOMWriter(outputStreamWriter);

    // TODO... instead of relying on file extensions, we need to keep
    // track of the grammar type
    // better yet we should reate an SSE document so that we can format it
    // nicely before saving
    // then we won't need the DOMWriter at all
    //
    domWriter.print(xmlDocument, charset, cmDocument.getNodeName(), getNonWhitespaceString(getPublicId()), getNonWhitespaceString(getSystemId()));
    outputStream.flush();
    outputStream.close();

    return outputStream;
  }
View Full Code Here

Examples of org.jboss.util.xml.DOMWriter

      }

      doc.appendChild(serverElement);

      // Write configuration
      new DOMWriter(out).setPrettyprint(true).print(doc);

      out.close();

      // Return configuration
      return out.toString();
View Full Code Here

Examples of org.jboss.util.xml.DOMWriter

    {
        Element reqEl = getElement(request);
        Element respEl = this.send(reqEl, endpointURL);
        StringWriter sw = new StringWriter();

        DOMWriter dw = new DOMWriter(sw);
        dw.print(respEl);
        return sw.toString();
        //return XMLUtils.toString(respEl);
    }
View Full Code Here

Examples of org.jboss.util.xml.DOMWriter

    {
        Element reqEl = getElement(request);
        Element respEl = this.send(reqEl, endpointURL);
        StringWriter sw = new StringWriter();

        DOMWriter dw = new DOMWriter(sw);
        dw.print(respEl);
        return sw.toString();
        //return XMLUtils.toString(respEl);
    }
View Full Code Here

Examples of org.jboss.util.xml.DOMWriter

    * @throws NestedRuntimeException  conversion exception occured
    */
   public String getAsText()
   {
      StringWriter sw = new StringWriter();
      DOMWriter dw = new DOMWriter(sw);
      dw.print((Node)getValue());
      return sw.toString();
   }
View Full Code Here

Examples of org.jboss.util.xml.DOMWriter

      ByteArrayOutputStream os2 = new ByteArrayOutputStream();
      for (OutputStream os : new OutputStream[]{os1, os2})
      {
        try
        {
          DOMWriter writer = new DOMWriter(os);
          writer.setPrettyprint(true);
          writer.print(parentElement);
        }
        finally
        {
          try { if (os != null) os.close(); } catch (Throwable t) {}
        }
View Full Code Here

Examples of org.jboss.util.xml.DOMWriter

      }

      doc.appendChild(serverElement);

      // Write configuration
      new DOMWriter(out).setPrettyprint(true).print(doc);

      out.close();

      // Return configuration
      return out.toString();
View Full Code Here

Examples of org.jboss.wsf.common.DOMWriter

         throw new WebServiceException("Invalid qname: " + operation);

      try
      {
         Element root = DOMUtils.parse(wsdlSource);
         new DOMWriter(System.out).setPrettyprint(true).print(root);
      }
      catch (IOException ex)
      {
         throw new WebServiceException("Cannot parse MessageContext.WSDL_DESCRIPTION", ex);
      }
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.