Package er.xiss

Examples of er.xiss.ERXML$Text


    private void print( Object element ) throws IOException, JDOMException
    {
        if( element instanceof Text )
        {
            Text t = (Text)element;
            String s = t.getText();
            if( m_preStack.isPreMode() )
            {
                m_out.print( s );
            }
            else
View Full Code Here


  }
 

  @Test
  public void testTextEmpty() {
    Text content = new Text("");
    assertEquals("", outputString(fraw,     content));
    assertEquals("", outputString(fcompact, content));
    assertEquals("", outputString(fpretty,  content));
    assertEquals("", outputString(ftso,     content));
    assertEquals("", outputString(ftfw,     content));
View Full Code Here

    assertEquals("", outputString(ftfw,     content));
  }
 
  @Test
  public void testTextWhitespace() {
    Text content = new Text(" \r \n \t ");
    assertEquals(expect(" \r \n \t "),
        outputString(fraw,     content));
    assertEquals("",
        outputString(fcompact, content));
    assertEquals("",
View Full Code Here

        outputString(ftfw,     content));
  }

  @Test
  public void testTextWithText() {
    Text content = new Text(" \r & \n \t ");
    assertEquals(expect(" \r & \n \t "),
        outputString(fraw,     content));
    assertEquals(expect("&"),
        outputString(fcompact, content));
    assertEquals(expect("&"),
View Full Code Here

 
  @Test
  public void testMultiWhiteText() {
    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 "));
    root.addContent(new Text("  \t "));
    root.addContent(new Text("  "));
    assertEquals(expect("<root><![CDATA[ ]]>        \n \n   \t   </root>"),
        outputString(fraw,     root));
    assertEquals(expect("<root/>"),
        outputString(fcompact, root));
    assertEquals(expect("<root/>"),
View Full Code Here

 
  @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 "));
    root.addContent(new Text("  \t "));
    root.addContent(new Text("  "));
    assertEquals(expect("<root><![CDATA[ ]]>     X  \n \n   \t   </root>"),
        outputString(fraw,     root));
    assertEquals(expect("<root>X</root>"),
        outputString(fcompact, root));
    assertEquals(expect("<root>X</root>"),
View Full Code Here

 
 
 
  @Test
  public void testXXX() {
    Text content = new Text("");
    assertEquals("",
        outputString(fraw,     content));
    assertEquals("",
        outputString(fcompact, content));
    assertEquals("",
View Full Code Here

 
 
 
  @Test
  public void testOutputText() {
    checkOutput(new Text(" hello  there  "), " hello  there  ", "hello there", "hello  there", "hello  there", " hello  there  ");
  }
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"));
    root.addContent(new EntityRef("amp"));
    root.addContent(new Text("vv"));
    root.addContent(new Text("  "));
    checkOutput(root,
        "<root><![CDATA[ ]]> xx yy    zz  ww&amp;vv  </root>",
        "<root>xx yy zz ww&amp;vv</root>",
        "<root>xx yy    zz  ww&amp;vv</root>",
        "<root>xx yy    zz  ww&amp;vv</root>",
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 "));
    root.addContent(new Text("  \t "));
    root.addContent(new Text("  "));
    checkOutput(root,
        "<root><![CDATA[ ]]>        \n \n   \t   </root>",
        "<root />",
        "<root />",
        "<root />",
View Full Code Here

TOP

Related Classes of er.xiss.ERXML$Text

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.