Package org.jsoup.nodes

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


        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

        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

        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

        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

      if (parents.size() >= 4) {
        dealElem = parents.get(3);
        break;
      }
    }
    if (dealElem == null || !"table".equals(dealElem.tagName()))
      throwElemNotFound("deal table");
    // java.lang.System.out.println("1:" + dealElem.html());
    extractHands(deal, dealElem);
    readScoring(deal, doc);
    return processResults(deal, doc);
View Full Code Here

    if (node instanceof Comment) {
      this.parserHandler.foundComment(node.outerHtml());
    } else if (node instanceof Element) {
      Element enode = (Element) node;
      String tagname = enode.tagName();
      String text = cleanOutControlChars(enode.text());
      String outerHTML = cleanOutControlChars(enode.outerHtml());
      String innerHTML = cleanOutControlChars(enode.html());
      Attributes attrs = enode.attributes();
      Map<String, String> attributeMap = new HashMap<String, String>();
View Full Code Here

    public static int getElIndexInSameTags(Element e){
        Elements chs = e.parent().children();
        int index = 1;
        for(int i=0;i<chs.size();i++){
            Element cur = chs.get(i);
            if (e.tagName().equals(cur.tagName())){
                if (e.equals(cur)){
                    break;
                }else {
                    index+=1;
                }
View Full Code Here

        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

        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

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.