Package com.volantis.mcs.dom

Examples of com.volantis.mcs.dom.Text


        this.testable = (DOMProtocolTestable) testable;
    }

    // javadoc inherited
    protected void checkResultForPre(final DOMOutputBuffer buffer) {
        final Text text = (Text) buffer.getRoot().getHead();
        assertEquals("     before          child     text          after     ",
            new String(text.getContents(), 0, text.getLength()));
    }
View Full Code Here


        String xml = "<prompt>well formed xml</prompt>";
        VoiceXMLRoot protocol = (VoiceXMLRoot) createTestableProtocol(
                internalDevice);
        Element element = protocol.createElementFromString(xml);
        assertEquals("prompt", element.getName());
        Text text = (Text) element.getHead();
        String contents = new String(text.getContents(), 0,
                                     text.getLength());
        assertEquals("well formed xml", contents);
    }
View Full Code Here

        protocol.doImage(buffer, attributes);
       
        // No src with alt text generates <span>text</span>
        Element root = buffer.getCurrentElement();
        Text altText = (Text)root.getHead();
        String txtAltText = new String(altText.getContents(),
                0, expected.length());
        assertEquals("Incorrect Text", expected, txtAltText);
    }
View Full Code Here

                Element p = domFactory.createElement();
                p.setName("BLOCK");
                parent.addTail(p);
                parent = p;
            }
            Text text = domFactory.createText();
            text.append(content);
            parent.addTail(text);
        }

        return td;
    }
View Full Code Here

                Element td = domFactory.createElement();
                td.setName("td");
                Element p = domFactory.createElement();
                p.setName("BLOCK");
                td.addTail(p);
                Text text = domFactory.createText();
                text.append("r");
                text.append(new Integer(row).toString());
                text.append(", c");
                text.append(new Integer(col).toString());
                p.addTail(text);
                tr.addTail(td);
            }
            if(col > maxColumns) {
                maxColumns = col;
View Full Code Here

        card.addTail(p);

        Element a = domFactory.createElement();
        a.setName("a");
        a.setAttribute("href", "wtai://wp/mc;20405050606");
        Text t = domFactory.createText();
        t.append("20405050606");
        a.addHead(t);
        p.addTail(a);

        Element anchor = domFactory.createElement();
        anchor.setName("anchor");
        anchor.setAttribute("href", "wtai://wp/mc;20405050606");
        anchor.addHead(t);
        p.addTail(anchor);

        String[] tags = {"big", "b", "em", "i", "small", "strong", "u"};

        for (int i = 0; i < tags.length; i++) {
            Element tag = domFactory.createElement();
            tag.setName(tags[i]);
            Text text = domFactory.createText();
            text.append("This is " + tags[i] + " text.");
            tag.addHead(text);
            p.addTail(tag);
        }

        wml.addHead(card);
View Full Code Here

        Element wml = domFactory.createElement();
        Element card = domFactory.createElement();
        Element dissectable = domFactory.createElement();
        Element dividehint = domFactory.createElement();
        Element p = domFactory.createElement();
        Text text = domFactory.createText();
       
        wml.setName("wml");
        card.setName("card");
        dissectable.setName(DissectionConstants.DISSECTABLE_CONTENTS_ELEMENT);
        dividehint.setName(DissectionConstants.DIVIDE_HINT_ELEMENT);
        p.setName("BLOCK");
        text.append("some content");
       
        document.addNode(wml);
        wml.addTail(card);
        card.addTail(dissectable);       
        dissectable.addTail(dividehint);
View Full Code Here

        Element wml = domFactory.createElement();
        Element card = domFactory.createElement();
        Element p1 = domFactory.createElement();
        Element dissectable = domFactory.createElement();
        Element dividehint = domFactory.createElement();
        Text zero = domFactory.createText();
        Element p2 = domFactory.createElement();
        Text text = domFactory.createText();
       
        wml.setName("wml");
        card.setName("card");
        p1.setName("BLOCK");
        dissectable.setName(DissectionConstants.DISSECTABLE_CONTENTS_ELEMENT);
        dividehint.setName(DissectionConstants.DIVIDE_HINT_ELEMENT);
        zero.append("");
        p2.setName("BLOCK");
        text.append("some content");
       
        document.addNode(wml);
        wml.addTail(card);
        card.addTail(p1);
        p1.addTail(dissectable);       
View Full Code Here

        Element wml = domFactory.createElement();
        Element card = domFactory.createElement();
        Element p1 = domFactory.createElement();
        Element dissectable = domFactory.createElement();
        Element p2 = domFactory.createElement();
        Text text = domFactory.createText();
        Element dividehint = domFactory.createElement();
        Text zero = domFactory.createText();
       
        wml.setName("wml");
        card.setName("card");
        p1.setName("BLOCK");
        dissectable.setName(DissectionConstants.DISSECTABLE_CONTENTS_ELEMENT);
        p2.setName("BLOCK");
        text.append("some content");
        dividehint.setName(DissectionConstants.DIVIDE_HINT_ELEMENT);
        zero.append("");
       
        document.addNode(wml);
        wml.addTail(card);
        card.addTail(p1);
        p1.addTail(dissectable);       
View Full Code Here

        Element wml = domFactory.createElement();
        Element card = domFactory.createElement();
        Element p1 = domFactory.createElement();
        Element dissectable = domFactory.createElement();
        Element dividehint1 = domFactory.createElement();
        Text zero1 = domFactory.createText();
        Element dividehint2 = domFactory.createElement();
        Text zero2 = domFactory.createText();
        Element p2 = domFactory.createElement();
        Text text = domFactory.createText();
       
        wml.setName("wml");
        card.setName("card");
        p1.setName("BLOCK");
        dissectable.setName(DissectionConstants.DISSECTABLE_CONTENTS_ELEMENT);
        dividehint1.setName(DissectionConstants.DIVIDE_HINT_ELEMENT);
        zero1.append("");
        dividehint2.setName(DissectionConstants.DIVIDE_HINT_ELEMENT);
        zero2.append("");
        p2.setName("BLOCK");
        text.append("some content");
       
        document.addNode(wml);
        wml.addTail(card);
        card.addTail(p1);
        p1.addTail(dissectable);       
View Full Code Here

TOP

Related Classes of com.volantis.mcs.dom.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.