Package org.milyn.delivery.sax

Examples of org.milyn.delivery.sax.DefaultSAXElementSerializer


  public void test_SAX_01() throws SAXException, IOException {
    Smooks smooks = new Smooks();
    StringResult result = new StringResult();
   
    smooks.addVisitor(new DefaultSAXElementSerializer(), "#document");
    smooks.addVisitor(new DefaultSAXElementSerializer(), "#document/**");
    smooks.setFilterSettings(new FilterSettings().setDefaultSerializationOn(false).setFilterType(StreamFilterType.SAX));
   
    smooks.filterSource(new StreamSource(getClass().getResourceAsStream("order.xml")), result);
   
    assertOK("expected_01.xml", result);       
View Full Code Here


  public void test_SAX_02() throws SAXException, IOException {
    Smooks smooks = new Smooks();
    StringResult result = new StringResult();
   
    smooks.addVisitor(new DefaultSAXElementSerializer(), "customer");
    smooks.addVisitor(new DefaultSAXElementSerializer(), "customer/**");
    smooks.setFilterSettings(new FilterSettings().setDefaultSerializationOn(false).setFilterType(StreamFilterType.SAX));
   
    smooks.filterSource(new StreamSource(getClass().getResourceAsStream("order.xml")), result);
   
    assertOK("expected_02.xml", result);       
View Full Code Here

  public void test_SAX_03() throws SAXException, IOException {
    Smooks smooks = new Smooks();
    StringResult result = new StringResult();
   
    smooks.addVisitor(new DefaultSAXElementSerializer(), "items");
    smooks.addVisitor(new DefaultSAXElementSerializer(), "items/**");
    smooks.setFilterSettings(new FilterSettings().setDefaultSerializationOn(false).setFilterType(StreamFilterType.SAX));
   
    smooks.filterSource(new StreamSource(getClass().getResourceAsStream("order.xml")), result);
   
    assertOK("expected_03.xml", result);       
View Full Code Here

            }
        }

        // We'll use the DefaultSAXElementSerializer to write out the targeted element
        // where the action is not "replace" or "bindto".
        targetWriter = new DefaultSAXElementSerializer();
        targetWriter.setWriterOwner(this);
        targetWriter.setRewriteEntities(rewriteEntities);
    }
View Full Code Here

TOP

Related Classes of org.milyn.delivery.sax.DefaultSAXElementSerializer

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.