Examples of tagName()


Examples of org.jsoup.nodes.Element.tagName()

        for (Node n: node.childNodes()) {
            if (n instanceof Element) {
                final Element child = (Element) n;

                //push form if this is a form tag
                if (child.tagName().equals("form"))
                    form = (Element) n;

                //setup a lexical scope if we're going into a repeat widget (by reading the previous node)
                final boolean shouldPopScope = lexicalClimb(child);
View Full Code Here

Examples of org.jsoup.nodes.Element.tagName()

    private static String cleanHtml(final Node node) {
        if (node instanceof Element) {
            Element element = ((Element) node);
            StringBuilder accum = new StringBuilder();
            accum.append("<").append(element.tagName());
            for (Attribute attribute: element.attributes()) {
                if (!(attribute.getKey().startsWith("_"))) {
                    accum.append(" ");
                    accum.append(attribute.getKey());
                    accum.append("=\"");
View Full Code Here

Examples of org.jsoup.nodes.Element.tagName()

            } else {
                accum.append(">");
                for (Node child : element.childNodes())
                    accum.append(cleanHtml(child));

                accum.append("</").append(element.tagName()).append(">");
            }
            return accum.toString();
        } else if (node instanceof TextNode) {
            return ((TextNode) node).getWholeText();
        } else if (node instanceof XmlDeclaration) {
View Full Code Here

Examples of org.jsoup.nodes.Element.tagName()

        String dataRef = ExtNodeConstants.ATTR_DATAREF_PREFIX_WITH_NS + key;
        Element elem = getCurrentRenderingElement();
        Object value = null;
        while (value == null && elem != null) {
            // for a faked snippet node, we will just jump over it
            if (elem.tagName().equals(ExtNodeConstants.SNIPPET_NODE_TAG)) {
                String type = elem.attr(ExtNodeConstants.SNIPPET_NODE_ATTR_TYPE);
                if (type.equals(ExtNodeConstants.SNIPPET_NODE_ATTR_TYPE_FAKE)) {
                    elem = elem.parent();
                    continue;
                }
View Full Code Here

Examples of org.jsoup.nodes.Element.tagName()

        String blockingParentId;
        for (Element elem : elems) {
            searchElem = elem.parent();
            blockingParentId = "";
            while (searchElem != null) {
                if (searchElem.tagName().equals(ExtNodeConstants.SNIPPET_NODE_TAG)) {
                    blockingParentId = searchElem.attr(ExtNodeConstants.ATTR_SNIPPET_REF);
                    break;
                } else {
                    searchElem = searchElem.parent();
                }
View Full Code Here

Examples of org.jsoup.nodes.Element.tagName()

        String dataRef = ExtNodeConstants.ATTR_DATAREF_PREFIX_WITH_NS + key;
        Element elem = getCurrentRenderingElement();
        Object value = null;
        while (value == null && elem != null) {
            // for a faked snippet node, we will just jump over it
            if (elem.tagName().equals(ExtNodeConstants.SNIPPET_NODE_TAG)) {
                String type = elem.attr(ExtNodeConstants.SNIPPET_NODE_ATTR_TYPE);
                if (type.equals(ExtNodeConstants.SNIPPET_NODE_ATTR_TYPE_FAKE)) {
                    elem = elem.parent();
                    continue;
                }
View Full Code Here

Examples of org.jsoup.nodes.Element.tagName()

        String blockingParentId;
        for (Element elem : elems) {
            searchElem = elem.parent();
            blockingParentId = "";
            while (searchElem != null) {
                if (searchElem.tagName().equals(ExtNodeConstants.SNIPPET_NODE_TAG)) {
                    blockingParentId = searchElem.attr(ExtNodeConstants.ATTR_SNIPPET_REF);
                    break;
                } else {
                    searchElem = searchElem.parent();
                }
View Full Code Here

Examples of org.jsoup.nodes.Element.tagName()

        headers = body.select( "h2" );

        for ( Iterator<Element> elementIterator = headers.iterator(); elementIterator.hasNext(); )
        {
            Element header = elementIterator.next();
            header.tagName( "h4" );
        }

        headers = body.select( "h3" );

        for ( Iterator<Element> elementIterator = headers.iterator(); elementIterator.hasNext(); )
View Full Code Here

Examples of org.jsoup.nodes.Element.tagName()

        headers = body.select( "h3" );

        for ( Iterator<Element> elementIterator = headers.iterator(); elementIterator.hasNext(); )
        {
            Element header = elementIterator.next();
            header.tagName( "h5" );
        }

        Document res = new Document( "" );
        res.appendChild( body.select( "div[id=main]" ).first() );
View Full Code Here

Examples of org.jsoup.nodes.Element.tagName()

        Elements headers = body.select( "h1" );

        for ( Iterator<Element> elementIterator = headers.iterator(); elementIterator.hasNext(); )
        {
            Element header = elementIterator.next();
            header.tagName( "h3" );
        }

        headers = body.select( "h2" );

        for ( Iterator<Element> elementIterator = headers.iterator(); elementIterator.hasNext(); )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.