Package er.xiss

Examples of er.xiss.ERXML$CDATA


  }
 
  @Test
  public void testMultiText() {
    Element root = new Element("root");
    root.addContent(new CDATA(" "));
    root.addContent(new Text(" "));
    root.addContent(new Text("    "));
    root.addContent(new Text(""));
    root.addContent(new Text("X"));
    root.addContent(new Text("  \n \n "));
View Full Code Here


    String rawcdata   = "<![CDATA[   hello   there  bozo !   ]]>";
    String compdata   = "<![CDATA[hello there bozo !]]>";
    String prettydata = "<![CDATA[hello   there  bozo !]]>";
    String trimdata   = "<![CDATA[   hello   there  bozo !   ]]>";
   
    checkOutput(new CDATA(indata), rawcdata, compdata, prettydata, prettydata, trimdata);
  }
View Full Code Here

  @Test
  public void testOutputElementCDATA() {
    String txt = "<root><![CDATA[xx]]></root>";
    Element root = new Element("root");
    root.addContent(new CDATA("xx"));
    checkOutput(root, txt, txt, txt, txt, txt);
  }
View Full Code Here

 

  @Test
  public void testOutputElementMultiText() {
    Element root = new Element("root");
    root.addContent(new CDATA(" "));
    root.addContent(new Text(" xx "));
    root.addContent(new Text("yy"));
    root.addContent(new Text("    "));
    root.addContent(new Text("zz"));
    root.addContent(new Text("  ww"));
View Full Code Here

  }

  @Test
  public void testOutputElementMultiAllWhite() {
    Element root = new Element("root");
    root.addContent(new CDATA(" "));
    root.addContent(new Text(" "));
    root.addContent(new Text("    "));
    root.addContent(new Text(""));
    root.addContent(new Text(" "));
    root.addContent(new Text("  \n \n "));
View Full Code Here

  }

  @Test
  public void testOutputElementMultiAllWhiteExpandEmpty() {
    Element root = new Element("root");
    root.addContent(new CDATA(" "));
    root.addContent(new Text(" "));
    root.addContent(new Text("    "));
    root.addContent(new Text(""));
    root.addContent(new Text(" "));
    root.addContent(new Text("  \n \n "));
View Full Code Here

  @Test
  public void testOutputElementMultiMostWhiteExpandEmpty() {
    // this test has mixed content (text-type and not text type).
    // and, it has a multi-text-type at the end.
    Element root = new Element("root");
    root.addContent(new CDATA(" "));
    root.addContent(new Text(" "));
    root.addContent(new Text("    "));
    root.addContent(new Text(""));
    root.addContent(new Text(" "));
    root.addContent(new Text("  \n \n "));
View Full Code Here

    // this test has mixed content (text-type and not text type).
    // and, it has a multi-text-type at the end.
    Element root = new Element("root");
    root.addContent(new Comment("Boo"));
    root.addContent(new Text(" "));
    root.addContent(new CDATA("A"));
    FormatSetup fs = new FormatSetup() {
      @Override
      public void setup(Format fmt) {
        fmt.setExpandEmptyElements(true);
      }
View Full Code Here

  }

  @Test
  public void testOutputElementMultiCDATALeftRight() {
    Element root = new Element("root");
    root.addContent(new CDATA(" tl "));
    root.addContent(new Text(" mid "));
    root.addContent(new CDATA(" tr "));
    checkOutput(root,
        "<root><![CDATA[ tl ]]> mid <![CDATA[ tr ]]></root>",
        "<root><![CDATA[tl]]> mid <![CDATA[tr]]></root>",
        "<root><![CDATA[tl ]]> mid <![CDATA[ tr]]></root>",
        "<root><![CDATA[tl ]]> mid <![CDATA[ tr]]></root>",
View Full Code Here

        return element;
    }

    protected Element generateCDATAElement(String name, String value) {
        Element element = new Element(name, CONTENT_NS);
        CDATA cdata = new CDATA(value);
        element.addContent(cdata);

        return element;
    }
View Full Code Here

TOP

Related Classes of er.xiss.ERXML$CDATA

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.