Package org.dom4j

Examples of org.dom4j.Document.asXML()


                      "<action><![CDATA[" + actionUrl + "]]></action>" + //$NON-NLS-1$ //$NON-NLS-2$
                      "<display><![CDATA[" + displayUrl + "]]></display>" + //$NON-NLS-1$ //$NON-NLS-2$
                      "Body" + "</filters>", null ); //$NON-NLS-1$ //$NON-NLS-2$

      StringBuffer content =
          XmlHelper.transformXml( parameterXsl, xslPath, new ByteArrayInputStream( document.asXML().getBytes() ),
              parameters, new JarEntityResolver() );
      System.out.println( "Transformed XML" + content ); //$NON-NLS-1$
    } catch ( Exception e ) {
      e.printStackTrace();
      Assert.assertTrue( "Exception thrown " + e.getMessage(), false ); //$NON-NLS-1$
View Full Code Here


    inputStream.reset();

    // Read in the XML string using the dom4j api and make sure the decoded xml
    // contains the same strings as the original document.
    document = XmlDom4JHelper.getDocFromStream( inputStream );
    System.out.println( document.asXML() );
    assertEquals( rootElementName, document.getRootElement().getName() );
    assertEquals( rootElementText, document.getRootElement().getText() );
  }

  public static void main( final String[] args ) {
View Full Code Here

        new StandaloneSession( Messages.getInstance().getString( "BaseTest.DEBUG_JUNIT_SESSION" ) ); //$NON-NLS-1$
    component.validate( session, null );
    component.setAction( PMDUIComponent.ACTION_LIST_MODELS );

    Document doc = component.getXmlContent();
    System.out.println( doc.asXML() );
    try {
      OutputStream outputStream = getOutputStream( "MetadataTest.testViewList", ".xml" ); //$NON-NLS-1$//$NON-NLS-2$
      outputStream.write( doc.asXML().getBytes() );
    } catch ( IOException e ) {
      //ignore
View Full Code Here

    Document doc = component.getXmlContent();
    System.out.println( doc.asXML() );
    try {
      OutputStream outputStream = getOutputStream( "MetadataTest.testViewList", ".xml" ); //$NON-NLS-1$//$NON-NLS-2$
      outputStream.write( doc.asXML().getBytes() );
    } catch ( IOException e ) {
      //ignore
    }
    finishTest();
  }
View Full Code Here

    component.setAction( PMDUIComponent.ACTION_LOAD_MODEL );
    component.setDomainName( "test" ); //$NON-NLS-1$
    component.setModelId( "Orders" ); //$NON-NLS-1$

    Document doc = component.getXmlContent();
    System.out.println( doc.asXML() );
    try {
      OutputStream outputStream = getOutputStream( "MetadataTest.testLoadView", ".xml" ); //$NON-NLS-1$//$NON-NLS-2$
      outputStream.write( doc.asXML().getBytes() );
    } catch ( IOException e ) {
      //ignore
View Full Code Here

    Document doc = component.getXmlContent();
    System.out.println( doc.asXML() );
    try {
      OutputStream outputStream = getOutputStream( "MetadataTest.testLoadView", ".xml" ); //$NON-NLS-1$//$NON-NLS-2$
      outputStream.write( doc.asXML().getBytes() );
    } catch ( IOException e ) {
      //ignore
    }
    finishTest();
  }
View Full Code Here

    component.setDomainName( "test" ); //$NON-NLS-1$
    component.setModelId( "Orders" ); //$NON-NLS-1$
    component.setColumnId( "BC_CUSTOMERS_CUSTOMERNAME" ); //$NON-NLS-1$

    Document doc = component.getXmlContent();
    System.out.println( doc.asXML() );
    try {
      OutputStream outputStream = getOutputStream( "MetadataTest.testLoadView", ".xml" ); //$NON-NLS-1$//$NON-NLS-2$
      outputStream.write( doc.asXML().getBytes() );
    } catch ( IOException e ) {
      //ignore
View Full Code Here

    Document doc = component.getXmlContent();
    System.out.println( doc.asXML() );
    try {
      OutputStream outputStream = getOutputStream( "MetadataTest.testLoadView", ".xml" ); //$NON-NLS-1$//$NON-NLS-2$
      outputStream.write( doc.asXML().getBytes() );
    } catch ( IOException e ) {
      //ignore
    }
    finishTest();
  }
View Full Code Here

                parentElement.addElement("logger", "http://www.mulesoft.org/schema/mule/core");
            }

            setSchemaLocation(rootElement, schemaLocations);

            return document.asXML();
        }
        catch (Throwable t)
        {
            throw new MuleArtifactFactoryException("Error generating minimal XML configuration.", t);
        }
View Full Code Here

    resp.setContentType("text/xml;charset=utf-8");  
    PrintWriter out = resp.getWriter();
    SAXReader reader = new SAXReader();
    try {
      document = reader.read(pluginStream);
      out.print(document.asXML());
    } catch (DocumentException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
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.