Package org.apache.pivot.xml

Examples of org.apache.pivot.xml.TextNode


            String text;
            if (node instanceof Element) {
                Element element = (Element)node;
                text = "<" + element.getName() + ">";
            } else if (node instanceof TextNode) {
                TextNode textNode = (TextNode)node;
                text = textNode.getText();

                if (text.length() > MAXIMUM_TEXT_LENGTH) {
                    text = "\"" + text.substring(0, MAXIMUM_TEXT_LENGTH) + "\"...";
                } else {
                    text = "\"" + text + "\"";
View Full Code Here


        String string;
        if (node instanceof Element) {
            Element element = (Element)node;
            string = element.getName();
        } else if (node instanceof TextNode) {
            TextNode textNode = (TextNode)node;
            string = textNode.getText();
        } else {
            throw new IllegalArgumentException();
        }

        return string;
View Full Code Here

TOP

Related Classes of org.apache.pivot.xml.TextNode

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.