Examples of XmlProcessor


Examples of hu.jokeman.xparser.parser.XMLProcessor

            fos = new FileOutputStream (args [0] + ".html");
            DocumentBuilderImpl builder = new DocumentBuilderImpl ();
            builder.createDocument ();

            // input file feldologz�sa
            XMLProcessor processor = new XMLProcessor (builder);
            processor.process (fis);

            // dokumentumgy�k�r elk�r�se
            XMLDocument doc = builder.getDocument ();

            // white space takar�t�s
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.output.xml.XMLProcessor

    Writer out = null;
    try
    {
      out = new BufferedWriter(new FileWriter(new File(fileName)));

      final XMLProcessor xprc = new XMLProcessor(report);
      xprc.setWriter(out);
      xprc.processReport();
      return true;
    }
    catch (Exception e)
    {
      System.err.println("Writing PDF failed.");
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.output.xml.XMLProcessor

    Writer out = null;
    try
    {
      out = new BufferedWriter(new FileWriter(new File(fileName)));

      final XMLProcessor xprc = new XMLProcessor(report);
      xprc.setWriter(out);
      xprc.processReport();
      return true;
    }
    catch (Exception e)
    {
      System.err.println("Writing PDF failed.");
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.output.xml.XMLProcessor

  public static void createDataXML(final MasterReport report)
      throws Exception
  {
    try
    {
      final XMLProcessor pr = new XMLProcessor(report);
      final Writer fout = new BufferedWriter(new OutputStreamWriter(new NullOutputStream(), "UTF-8"));
      pr.setWriter(fout);
      pr.processReport();
      fout.flush();
    }
    catch (ReportParameterValidationException e)
    {
      Assert.fail();
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.output.xml.XMLProcessor

  }

  protected boolean writeXml( final MasterReport report, final OutputStream outputStream ) {
    boolean result = false;
    try {
      final XMLProcessor processor = new XMLProcessor( report );
      final OutputStreamWriter writer = new OutputStreamWriter( outputStream );
      processor.setWriter( writer );
      processor.processReport();

      writer.close();
      result = true;
    } catch ( ReportProcessingException e ) {
      error( Messages.getInstance().getString( "JFreeReportXmlComponent.ERROR_0046_FAILED_TO_PROCESS_REPORT" ), e ); //$NON-NLS-1$
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.modules.output.xml.XMLProcessor

  @SuppressWarnings( "deprecation" )
  @Override
  protected boolean performExport( final MasterReport report, final OutputStream outputStream ) {
    try {
      final XMLProcessor processor = new XMLProcessor( report );
      final OutputStreamWriter writer = new OutputStreamWriter( outputStream );
      processor.setWriter( writer );
      processor.processReport();

      writer.close();
      close();
      return true;
    } catch ( ReportProcessingException e ) {
View Full Code Here

Examples of sortpom.XmlProcessor

        assertEquals(expected, actual);
    }

    public String sortXmlAndReturnResult(String inputFileName) throws Exception {
        final XmlProcessor xmlProcessor = setup(inputFileName);
        xmlProcessor.sortXml();
        final ByteArrayOutputStream sortedXmlOutputStream = xmlProcessor.getSortedXml();
        return sortedXmlOutputStream.toString(UTF_8);
    }
View Full Code Here

Examples of sortpom.XmlProcessor

        final ByteArrayOutputStream sortedXmlOutputStream = xmlProcessor.getSortedXml();
        return sortedXmlOutputStream.toString(UTF_8);
    }

    public void testVerifyXmlIsOrdered(final String inputFileName) throws Exception {
        final XmlProcessor xmlProcessor = setup(inputFileName);
        xmlProcessor.sortXml();
        assertEquals(true, xmlProcessor.isXmlOrdered().isOrdered());
    }
View Full Code Here

Examples of sortpom.XmlProcessor

        xmlProcessor.sortXml();
        assertEquals(true, xmlProcessor.isXmlOrdered().isOrdered());
    }

    public void testVerifyXmlIsNotOrdered(final String inputFileName, String infoMessage) throws Exception {
        final XmlProcessor xmlProcessor = setup(inputFileName);
        xmlProcessor.sortXml();
        XmlOrderedResult xmlOrdered = xmlProcessor.isXmlOrdered();
        assertEquals(false, xmlOrdered.isOrdered());
        assertEquals(infoMessage, xmlOrdered.getErrorMessage());
    }
View Full Code Here

Examples of sortpom.XmlProcessor

        fileUtil.setup(pluginParameters);

        WrapperFactory wrapperFactory = new WrapperFactoryImpl(fileUtil);
        ((WrapperFactoryImpl) wrapperFactory).setup(pluginParameters);

        final XmlProcessor xmlProcessor = new XmlProcessor(wrapperFactory);
        xmlProcessor.setup(pluginParameters);

        if (sortAlfabeticalOnly) {
            wrapperFactory = new WrapperFactory() {

                @Override
                public HierarchyWrapper createFromRootElement(final Element rootElement) {
                    return new HierarchyWrapper(new AlphabeticalSortedWrapper(rootElement));
                }

                @SuppressWarnings("unchecked")
                @Override
                public <T extends Content> Wrapper<T> create(final T content) {
                    if (content instanceof Element) {
                        Element element = (Element) content;
                        return (Wrapper<T>) new AlphabeticalSortedWrapper(element);
                    }
                    return new UnsortedWrapper<T>(content);
                }

            };
        } else {
            new ReflectionHelper(wrapperFactory).setField(fileUtil);
        }
        new ReflectionHelper(xmlProcessor).setField(wrapperFactory);
        xmlProcessor.setOriginalXml(new ByteArrayInputStream(xml.getBytes(UTF_8)));
        return xmlProcessor;
    }
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.