追加子节点
@param ele
@returns {*}
1295
function (ele) {
            var node = this[0];
            //结点类型判断
            if (node.nodeType === 1 || node.nodeType === 11 || node.nodeType === 9) {
                if(ele instanceof vQ){
                    ele.each(function(inx,ele){
                        node.appendChild(ele);
                    });
                } else if(ele.nodeType){
                    node.appendChild(ele);
                }
                // string array
            }
            return this;
        }
1274824
function appendChildren(children, el) {
	ensureArray(children)
		.forEach(append.bind(el));
	return el;
}
1370001
function(elem) {
    var that = this, nodeAW = elem._angularWidth, sumAW = 0;
    elem.eachSubnode(function(child) {
      that.setSubtreeAngularWidth(child);
      sumAW += child._treeAngularWidth;
    }, "ignore");
    elem._treeAngularWidth = Math.max(nodeAW, sumAW);
  }
1141647
function(elem, child) {
		if (child) {
			var tag = (elem.tagName||'').toLowerCase();
			if (elem.nodeType === 8) { // comment
				if (child.nodeType === 3) { // text node
					elem.nodeValue += child.nodeValue;
				}
			} else if (tag === 'table' && elem.tBodies) {
				if (!child.tagName) {
					// must unwrap documentFragment for tables
					if (child.nodeType === 11) {
						while (child.firstChild) {
							appendDOM(elem, child.removeChild(child.firstChild));
						}
					}
					return;
				}

				// in IE must explicitly nest TRs in TBODY
				var childTag = child.tagName.toLowerCase();// child tagName
				if (childTag && childTag !== 'tbody' && childTag !== 'thead') {
					// insert in last tbody
					var tBody = elem.tBodies.length > 0 ? elem.tBodies[elem.tBodies.length-1] : null;
					if (!tBody) {
						tBody = createElement(childTag === 'th' ? 'thead' : 'tbody');
						elem.appendChild(tBody);
					}
					tBody.appendChild(child);
				} else if (elem.canHaveChildren !== false) {
					elem.appendChild(child);
				}

			} else if (tag === 'style' && document.createStyleSheet) {
				// IE requires this interface for styles
				elem.cssText = child;

			} else if (elem.canHaveChildren !== false) {
				elem.appendChild(child);

			} else if (tag === 'object' &&
				child.tagName && child.tagName.toLowerCase() === 'param') {
					// IE-only path
					try {
						elem.appendChild(child);
					} catch (ex1) {}
					try {
						if (elem.object) {
							elem.object[child.name] = child.value;
						}
					} catch (ex2) {}
			}
		}
	}
70059
private LayoutRoot parseUI(ElementBase root) {
        LayoutRoot ele = new LayoutRoot();

        if (root instanceof ElementDesktop) {
            copyAttributes(root, ele);
        }

        parseChildren(root, ele);
        return ele;
    }
285044
def md_el(node_type, children=[], meta={}, al=nil)
		if  (e=children.first).kind_of?(MDElement) and 
			e.node_type == :ial then
			if al
				al += e.ial
			else
				al = e.ial
			end
			children.shift
		end 
		e = MDElement.new(node_type, children, meta, al)
		e.doc = @doc
		return e
	end
1358295
public int indexOf(int ele) {
        int i;

        for (i = 0; i < size; i++) {
            if (data[i] == ele) {
                return i;
            }
        }
        return -1;
    }
34530
public function append($ele)
  {
    $args = \func_get_args();
    foreach ( $args as $ele ){
      if ( !isset($this->content) ){
        if ( \is_array($ele) && isset($ele[0]) ){
          $this->content = $ele;
        }
        else{
          $this->content = \is_object($ele) ? [$ele] : $ele;
        }
      }
      else if ( \is_array($this->content) ){
        if ( \is_array($ele) ){
          array_merge($this->content, $ele);
        }
        else{
          array_push($this->content, $ele);
        }
      }
      else if ( \is_string($this->content) ){
        if ( \is_array($ele) ){
          foreach ( $ele as $e ){
            $this->content .= $e->html();
          }
        }
        else{
          $this->content .= \is_object($ele) ? $ele->html() : $ele;
        }
      }
    }
    return $this;
  }
545609
def add(self, elem):
        
        if not isinstance(elem, JWK):
            raise TypeError('Only JWK objects are valid elements')
        set.add(self, elem)
206697
function (el, cls) {
        cls = getString(cls);
        if (!cls) return;
        if (Array.isArray(cls)) {
            cls.forEach(function(c) {
                dom.addClass(el, c);
            });
        } else if (el.classList) {
            el.classList.add(cls);
        } else {
            if (!hasClass(el, cls)) {
                if (el.classList) {
                    el.classList.add(cls);
                } else {
                    el.className += ' ' + cls;
                }
            }
        }
    }
1306419
private boolean addInstanceOfElement(HeaderElement root, HeaderElement elem) {
        // first add to the overall sequence list
        if (null == this.hdrSequence) {
            this.hdrSequence = elem;
            this.lastHdrInSequence = elem;
        } else {
            // find the end of the list and append this new element
            this.lastHdrInSequence.nextSequence = elem;
            elem.prevSequence = this.lastHdrInSequence;
            this.lastHdrInSequence = elem;
        }
        if (null == root) {
            return true;
        }
        HeaderElement prev = root;
        while (null != prev.nextInstance) {
            prev = prev.nextInstance;
        }
        prev.nextInstance = elem;
        return false;
    }
1059390
public static Optional<Element> getChildElement(final Element elem, final DitaClass cls) {
        final NodeList children = elem.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            final Node child = children.item(i);
            if (cls.matches(child)) {
                return Optional.of((Element) child);
            }
        }
        return Optional.empty();
    }
299697
function (elem)
    {
        // save stream:features for future usage
        this.features = elem;

        var i, child;

        for (i = 0; i < elem.childNodes.length; i++) {
            child = elem.childNodes[i];
            if (child.nodeName == 'bind') {
                this.do_bind = true;
            }

            if (child.nodeName == 'session') {
                this.do_session = true;
            }
        }

        if (!this.do_bind) {
            this._changeConnectStatus(Strophe.Status.AUTHFAIL, null);
            return false;
        } else {
            this._addSysHandler(this._sasl_bind_cb.bind(this), null, null,
                                null, "_bind_auth_2");

            var resource = Strophe.getResourceFromJid(this.jid);
            if (resource) {
                this.send($iq({type: "set", id: "_bind_auth_2"})
                          .c('bind', {xmlns: Strophe.NS.BIND})
                          .c('resource', {}).t(resource).tree());
            } else {
                this.send($iq({type: "set", id: "_bind_auth_2"})
                          .c('bind', {xmlns: Strophe.NS.BIND})
                          .tree());
            }
        }

        return false;
    }
1075966
def addSibling(self, elem):
        
        if elem is None: elem__o = None
        else: elem__o = elem._o
        ret = libxml2mod.xmlAddSibling(self._o, elem__o)
        if ret is None:raise treeError('xmlAddSibling() failed')
        __tmp = xmlNode(_obj=ret)
        return __tmp
1081338
private static TreeElement recursiveFindSelected(TreeElement elem)
    {
        assert(elem != null);

        if (elem.isSelected())
            return elem;

        TreeElement children[] = elem.getChildren();
        assert(children != null);
        for (int i = 0; i < children.length; i++) {
            TreeElement e = recursiveFindSelected(children[i]);
            if (e != null)
                return e;
        }
        return null;
    }
140242
function(node) {
			var classes,
				out = [],
				obj,
				itemRootID;

			// loop roots found on one element
			classes = this.getUfClassNames(node);
			if(classes && classes.root.length && classes.root.length > 0){

				this.rootID++;
				itemRootID = this.rootID;
				obj = this.createUfObject(classes.root, classes.typeVersion);

				this.walkChildren(node, obj, classes.root, itemRootID, classes);
				if(this.impliedRules){
					this.impliedRules(node, obj, classes);
				}

				if(this.options.lang === true){
					var lang = modules.domUtils.getFirstAncestorAttribute(node, 'lang');
					if(lang){
						obj.lang = lang;
					}
				}
				out.push( this.cleanUfObject(obj) );


			}
			return out;
		}
1327972
def rinseElement(self, ele):
        
        if '*' in ele:
            tmplist = ''.join(ele.split()).split('*')
            tmplist_num = tmplist[[x.isdigit() for x in tmplist].index(True)]
            tmplist_ele = tmplist[[x.isdigit() for x in tmplist].index(False)]
            return dict(zip(('num', 'name'), (int(tmplist_num), tmplist_ele)))
        else:
            return dict(zip(('num', 'name'), (1, ele)))