Gets the value of the first child element with the given name.
@param localName the name of the element
@return the element's text or null if not found
421947
public String first(String localName) {
		for (Element child : children()) {
			if (localName.equals(child.getLocalName()) && XCAL_NS.equals(child.getNamespaceURI())) {
				return child.getTextContent();
			}
		}
		return null;
	}
632022
public final ChildSelector<T> element(String localName, ElementConstraint...constraints) {
        return element(new QName(localName), constraints);
    }
659970
static public String getTextValue(Node node) {
        if( node.getChildNodes().getLength() == 0 ) {
            return null;
        }
        return node.getFirstChild().getNodeValue();
    }
804788
@Nullable
  public static Element findFirstElement(@Nonnull final Element node, @Nonnull final String elementName) {
    Element result = null;
    for (final Element l : Utils.findDirectChildrenForName(node, elementName)) {
      result = l;
      break;
    }
    return result;
  }
1056225
public static String getChildText(Element parent, String childName) {
		Element child = getChild(parent, childName);
		if (child == null) return null;
		return getInnerText(child);
	}
631224
public String getlocalName() {
        if (fqn.contains(".")) {
            return this.fqn.substring(fqn.lastIndexOf('.') + 1, this.fqn.length());
        }
        return fqn;
    }
790986
public static Node getChildNode(Node parentNode, String name, String value){
                List<Node> matchingChildren = getChildren(parentNode, name, value);
                return (matchingChildren.size() > 0) ? matchingChildren.get(0) : null;
        }
165686
private Optional<LocalComponent> getLocalComponentForElement(Element element) {
    String componentName = element.getAttributes().getValue("is");
    if (componentName == null) {
      componentName = element.getStartTag().getName();
    }

    return context.getLocalComponent(componentName);
  }
18625
public String getLocalNameOfNode(Node n)
  {

    String qname = n.getNodeName();
    int index = qname.indexOf(':');

    return (index < 0) ? qname : qname.substring(index + 1);
  }
274953
private Element getChildElement(String name) {
        if (currentChild == null) {
            // element has no children.
            return null;
        }
        Node start = currentChild;
        do {
            Node node = currentChild;
            currentChild = currentChild.getNextSibling();
            if (currentChild == null) {
                currentChild = currentElement.getFirstChild();
            }
            if (node.getNodeType() == Node.ELEMENT_NODE
                    && node.getNodeName().equals(name)) {
                return (Element) node;
            }
        } while (currentChild != start);
        return null;
    }
196602
public VoltXMLElement findChild(String uniqueName)
    {
        for (VoltXMLElement vxe : children) {
            if (uniqueName.equals(vxe.getUniqueName())) {
                return vxe;
            }
        }
        return null;
    }
48576
public String getLocalName()
    {
        HttpConnection connection= _httpRequest.getHttpConnection();
        if (connection!=null)
            return connection.getServerName();
        return null;
    }
834058
public String getLocalName(int index) {
    if (index < 0 || index >= indexSet.size())
      return null;
    return attributes.getLocalName(indexSet.get(index));
  }
1272019
public String getValue(String propertyName) {
        Property property = super.get(propertyName);
        if (property == null) {
            return null;
        }
        return property.getValue();
    }
1148263
public static Element getChild(final String name, final Element root) {
		@SuppressWarnings("unchecked")
		List<Element> allChildren = root.getChildren();
		for (Element child : allChildren) {
			if (child.getName().equals(name)) {
				return child;
			}
		}
		return null;
	}
1197522
public TagAttribute get(String ns, String localName)
    {
        if (ns != null && localName != null)
        {
            int idx = Arrays.binarySearch(_namespaces, ns);
            if (idx >= 0)
            {
                for (TagAttribute attribute : _nsattrs.get(idx))
                {
                    if (localName.equals(attribute.getLocalName()))
                    {
                        return attribute;
                    }
                }
            }
        }
        
        return null;
    }
760893
protected final TagAttribute getRequiredAttribute(String localName) throws TagException
    {
        TagAttribute attr = this.getAttribute(localName);
        if (attr == null)
        {
            throw new TagException(this.tag, "Attribute '" + localName + "' is required");
        }
        
        return attr;
    }