Get specific element node from child nodes.

@param element    parent node
@param classValue DITA class to search for
@return element node, {@code null} if not found
432412
public static Element getElementNode(final Element element, final DitaClass classValue) {
        final NodeList list = element.getChildNodes();
        for (int i = 0; i < list.getLength(); i++) {
            final Node node = list.item(i);
            if (node.getNodeType() == Node.ELEMENT_NODE) {
                final Element child = (Element) node;
                if (classValue.matches(child)) {
                    return child;
                }
            }
        }
        return null;
    }
1128363
protected CmsContainerElementBean getParentElement(CmsContainerElementBean element) {

        if (m_elementInstances == null) {
            initPageData();
        }
        CmsContainerElementBean parent = null;
        CmsContainerBean cont = m_parentContainers.get(element.getInstanceId());
        if ((cont != null) && cont.isNestedContainer()) {
            parent = m_elementInstances.get(cont.getParentInstanceId());
        }
        return parent;
    }
205212
@SuppressWarnings("unchecked")
    public static <T> T convertValue(JsonNode node, Class<T> clazz) {
        if (node instanceof POJONode) {
            return convertValue(DPathUtils.extractValue((POJONode) node), clazz);
        }
        if (clazz == null) {
            throw new NullPointerException("Class parameter is null!");
        }
        if (node == null || node instanceof NullNode || node instanceof MissingNode) {
            return null;
        }
        if (node instanceof POJONode) {
            return convertValue(DPathUtils.extractValue((POJONode) node), clazz);
        }
        if (Number.class.isAssignableFrom(clazz) || byte.class == clazz || short.class == clazz
                || int.class == clazz || long.class == clazz || float.class == clazz
                || double.class == clazz) {
            return convertNumber(node, clazz);
        }
        if (clazz == Boolean.class || clazz == boolean.class) {
            return (T) convertBoolean(node);
        }
        if (clazz == Character.class || clazz == char.class) {
            return (T) convertChar(node);
        }
        if (Date.class.isAssignableFrom(clazz)) {
            return (T) convertDate(node);
        }
        if (Object[].class.isAssignableFrom(clazz) || List.class.isAssignableFrom(clazz)) {
            return (T) convertArrayOrList(node);
        }
        if (clazz.isAssignableFrom(node.getClass())) {
            return (T) node;
        }
        if (clazz == String.class) {
            return (T) (node.isTextual() ? node.asText() : node.toString());
        }
        throw new IllegalArgumentException(
                "Cannot convert an object of type [" + node.getClass() + "] to [" + clazz + "]!");
    }
1063554
private XmlElementFinder getElementFinder(final Element element) {
		if (elementFinder == null) {
			elementFinder = new XmlElementFinder(element.getDocument());
		}
		return elementFinder;
	}
1181747
function(node) {
        var data = {}

        var key = null
        for (var i = 0, len = node.childNodes.length; i < len; i++) {
            var child = node.childNodes[i]
            if (child.nodeType != ELEMENT_NODE) {
                continue
            }

            // Grab the key, next noe should be the value
            if (child.tagName == 'key') {
                key = child.firstChild.nodeValue
            } else {
                // Parse the value node
                data[key] = this._parseNode(child)
            }
        }


        return data
    }
164650
@Override
	public String[] getChildNodesValuesText() throws WidgetException {
		WebElement we = new Element(getByLocator()).getWebElement();
		List<WebElement> childNodes = we.findElements(By.xpath("./*"));
		String[] childText = new String[childNodes.size()];
		int i = 0;
		for (WebElement element : childNodes) {
			childText[i] = element.getText();
			i++;
		}
		return childText;
	}
1123057
public String getFormattedParentValue()
   {
      String result = null;
      if (m_elements.size() > 2)
      {
         result = joinElements(m_elements.size() - 2);
      }
      return result;
   }
962151
function () {
            var childNodes = this.nodes();
            if (childNodes.length < 1) {
                return null;
            }
            var elementValue = '';
            for (var i = 0; i < childNodes.length; i++) {
                var node = childNodes[i];
                var valueToAdd;
                if (!TypeUtils.isNullOrUndefined(node.value)) {
                    valueToAdd = node.value;
                }
                else {
                    valueToAdd = node.toString();
                }
                if (!TypeUtils.isNullOrUndefined(valueToAdd)) {
                    elementValue += valueToAdd;
                }
            }
            return elementValue;
        }
1153359
private LayoutElement parseElement(Element node, LayoutElement parent) {
        LayoutElement layoutElement = newLayoutElement(node, parent, null);
        parseChildren(node, layoutElement, Tag.ELEMENT, Tag.TRIGGER);
        return layoutElement;
    }
473503
public static List<Element> getElementsByClass(String className, Element rootElement) {

        return getElementsByClass(className, Tag.ALL, rootElement);

    }
960564
protected XmlElement findMatchedElementIn(Document document, org.dom4j.Element element) {
    org.dom4j.Attribute id = element.attribute("id");
    String idName = id.getName();
    String idValue = id.getValue();
    for (Element me : document.getRootElement().getElements()) {
      if (me instanceof XmlElement) {
        XmlElement xe = (XmlElement) me;
        for (Attribute ab : xe.getAttributes()) {
          if (StringUtils.equals(idName, ab.getName()) && StringUtils.equals(idValue, ab.getValue())) {
            return xe;
          }
        }
      }
    }
    return null;
  }
1216350
public static <T> T getValue(JsonNode node, String dPath, Class<T> clazz) {
        return DPathUtils.getValue(node, dPath, clazz);
    }
85004
public Element getElement(NodeList list, String key, String value) {
	int len = list.getLength();
	for (int i = 0; i < len; i++) {
	    Node n = list.item(i);
	    if (n instanceof Element) {
		Element el = (Element) n;
		if (el.getAttribute(key).equalsIgnoreCase(value)) return el;
	    }
	}
	return null;
    }
729753
public static String getAttributeValueOrNull(final Node elementNode, final String attrName)
    {
        if (null == elementNode || null == elementNode.getAttributes())
        {
            return null;
        }

        final Node attrNode = elementNode.getAttributes().getNamedItemNS(null, attrName);
        if (null == attrNode)
        {
            return null;
        }

        return attrNode.getNodeValue();
    }
938955
@SuppressWarnings("unchecked")
    private <T> T parseElement(Element element, Class<T> cls) {
        T value;
        if (element == null) {
            value = null;
        } else if (MwsObject.class.isAssignableFrom(cls)) {
            value = MwsUtl.newInstance(cls);
            Element holdElement = currentElement;
            Node holdChild = currentChild;
            setCurrentElement(element);
            ((MwsObject) value).readFragmentFrom(this);
            currentElement = holdElement;
            currentChild = holdChild;
        } else if (cls == Object.class) {
            value = (T)element;
        } else {
            String v = getElementText(element);
            value = parseString(v, cls);
        }
        return value;
    }
81958
public static Element getChildElement(Element parent, String tagName) {
        List<Element> children = getChildElements(parent, tagName);

        if (children.isEmpty()) {
            return null;
        } else {
            return children.get(0);
        }
    }
494904
public String getChildElementTextValue(Element parentElement, String elementName) {

        try {
            // get the first child element matching the specified name
            Element childElement = (Element)parentElement.selectNodes("./" + elementName).get(0);
            // return the value of the child element
            return childElement.getTextTrim();
        } catch (Exception e) {
            return null;
        }
    }