Examples of tagName()


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

      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

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

    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

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

    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

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()

        // handle empty unknown tags
        // when the spec expects an empty tag, will directly hit insertEmpty, so
        // won't generate fake end tag.
        if (startTag.isSelfClosing() && !Tag.isKnownTag(startTag.name())) {
            Element el = insertEmpty(startTag);
            process(new Token.EndTag(el.tagName())); // ensure we get out of
                                                     // whatever state we are in
            return el;
        }

        Element el = new Element(Tag.valueOf(startTag.name()), baseUri, startTag.attributes);
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()

       
        Elements spansb = element.child(1).getElementsByClass("c_ba2636");
        Iterator<Element> bIterator = spansb.iterator();
        while(bIterator.hasNext()){
          Element element2 = bIterator.next();
          if(!"span".equals(element2.tagName())){
            //spansb.remove(element2);
            bIterator.remove();
          }
        }
        if (spansb.size()==1) {
View Full Code Here

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

        String a = "";
        Elements spansa = element.child(1).getElementsByClass("c_1e50a2");
        Iterator<Element> aIterator = spansa.iterator();
        while(aIterator.hasNext()){
          Element element2 = aIterator.next();
          if(!"span".equals(element2.tagName())){
            //spansb.remove(element2);
            aIterator.remove();
          }
        }
        if (spansa.size()==1) {
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.