Package org.jboss.util.xml

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


    {
        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

    {
        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

    * @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

      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

      }

      doc.appendChild(serverElement);

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

      out.close();

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

               contents.append(entry.getKey() + "=\"" + entry.getValue() + "\" ");
            }
         }
         contents.append(">");
        
         DOMWriter domWriter = new DOMWriter(new BufferedWriter(writer));
         if (elements != null && elements.size() > 0)
         {
            for (Element child : elements)
            {
               domWriter.print(child);
            }
         }
        
         contents.append("</" + elementName + ">");
        
View Full Code Here

            StringWriter writer = new StringWriter();
           
            root.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
            root.setAttribute("xsi:noNamespaceSchemaLocation", schemaUrl.toString());

            DOMWriter domWriter = new DOMWriter(new BufferedWriter(writer));
            domWriter.setWriteXMLDeclaration(true);
            domWriter.print(doc);
           
            return new StringReader(writer.getBuffer().toString());
         }
      }
      finally
View Full Code Here

    public String send(String request, URI endpointURL) throws RegistryException {
        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();
    }
View Full Code Here

      }

      doc.appendChild(serverElement);

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

      out.close();

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

TOP

Related Classes of org.jboss.util.xml.DOMWriter

Copyright © 2018 www.massapicom. 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.