Examples of IndentingXMLWriter


Examples of nexj.core.util.IndentingXMLWriter

   {
      Writer writer = m_response.getWriter();

      if (getParameter("indent-xml") != null)
      {
         writer = new IndentingXMLWriter(writer);
      }

      return writer;
   }
View Full Code Here

Examples of nexj.core.util.IndentingXMLWriter

         for (int i = 0; i < MACRO_NAME_ARRAY.length; ++i)
         {
            if (MACRO_NAME_ARRAY[i].equals(sName))
            {
               StringWriter sw = new StringWriter();
               IndentingXMLWriter writer = new IndentingXMLWriter(sw);
              
               new DefaultXMLMetadataExporter(writer).exportJ2EEDescriptor(m_metadata, i, sNamespace, m_nContainer, m_nContext);
                                            
               writer.close();

               return sw.toString();
            }
         }
View Full Code Here

Examples of org.exist.util.serializer.IndentingXMLWriter

          //serialize the node to SAX
          ByteArrayOutputStream baos = new ByteArrayOutputStream();

            OutputStreamWriter osw = new OutputStreamWriter( baos, UTF_8 );

          IndentingXMLWriter     xmlWriter = new IndentingXMLWriter( osw );
          Properties outputProperties = new Properties();
          outputProperties.setProperty(OutputKeys.ENCODING, "UTF-8");
          if (indentLevel != null) {
              outputProperties.setProperty(OutputKeys.INDENT, "yes");
              outputProperties.setProperty(EXistOutputKeys.INDENT_SPACES, indentLevel);
          } else {
              outputProperties.setProperty(OutputKeys.INDENT, "no");
          }
          xmlWriter.setOutputProperties(outputProperties);
 
          SAXSerializer sax       = new SAXSerializer();
 
          sax.setReceiver( xmlWriter );
 
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.