Get element node string value.

@param element element to get string value for
@return concatenated text node descendant values
190604
public static String getStringValue(final Element element) {
        final StringBuilder buf = new StringBuilder();
        final NodeList children = element.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            final Node n = children.item(i);
            switch (n.getNodeType()) {
            case Node.TEXT_NODE:
                buf.append(n.getNodeValue());
                break;
            case Node.ELEMENT_NODE:
                buf.append(getStringValue((Element) n));
                break;
            }
        }
        return buf.toString();
    }
1211844
String getElementKeyString(Element element) {
		JsonKey key = element.getAnnotation(JsonKey.class);
		JsonModel model = element.getEnclosingElement().getAnnotation(JsonModel.class);
		if (!"".equals(key.value())) {
			return key.value();
		} else if ("".equals(key.value()) && key.decamelize()) {
			return decamelize(element.toString());
		} else if ("".equals(key.value()) && model.decamelize()) {
			return decamelize(element.toString());
		} else {
			return element.toString();
		}
	}
352240
protected Element findTag(String tagName, Element element) {
        Node result = element.getFirstChild();
        
        while (result != null) {
            if (result instanceof Element
                    && (tagName.equals(((Element) result).getNodeName()) || tagName
                            .equals(((Element) result).getLocalName()))) {
                break;
            }
            result = result.getNextSibling();
        }
        
        return (Element) result;
    }
1101435
public String getText(Object element)
	{
		String result = VdmElementLabels.getTextLabel(element, evaluateTextFlags(element));
		// if (result.length() == 0 && (element instanceof IStorage)) {
		// result= fStorageLabelProvider.getText(element);
		// }
		return decorateText(result, element);
	}
1173781
protected String getPropertyDefaultValue(AnnotatedElement element) {
        if (element.isAnnotationPresent(DefaultValue.class)) {
            return element.getAnnotation(DefaultValue.class).value();
        }
        return null;
    }
639553
private String getText(Element element) {
		try {
			for (int i = 0; i < element.getChildNodes().getLength(); i++) {
				Node node = element.getChildNodes().item(i);
				if (node.getNodeType() == Node.TEXT_NODE) {
					return node.getNodeValue();
				}
			}
		} catch (Exception e) {
		}
		return "";

	}
372903
public static DateFormat getDateFormat(final Element element) {
		if (XMLTags.FORMAT.equals(element.getName())) {
			return createDateFormat(element);
		}
		Element child = element.getChild(XMLTags.FORMAT);
		if (child != null) {
			return createDateFormat(child);
		}
		return getDateFormat(element.getParentElement());
	}
254992
static String getAttributeValue(Element element, String name) {
        Attr attribute = element.getAttributeNode(name);
        if (attribute == null) {
            return null;
        } else {
            return attribute.getValue();
        }
    }
583001
@Override
    public Element getXML(Document root) {
        Element node = root.createElement("folder");
        this.addNodeAttributes(node);
        return node;
    }
698594
public static String getNameForNew(Element element) {
		if (element.getKind() != ElementKind.CLASS) {
			throw new IllegalStateException();
		}
		return getNameForNew("", element);
	}
33849
static String getDeepName(final Element element) {
        if (element == null) {
            return "";
        }
        return getDeepName(element.getParentElement()) + '/' + element.getName();
    }
1152848
private int getElementIndex(Node node) {
        final String nodeName = node.getNodeName();

        int count = 1;
        for (Node previousSibling = node.getPreviousSibling();
                previousSibling != null;
                previousSibling = previousSibling.getPreviousSibling()) {
            if (previousSibling.getNodeType() == Node.ELEMENT_NODE
                    && previousSibling.getNodeName().equals(nodeName)) {
                count++;
            }
        }

        return count;
    }
1043010
public String getPlainText(Element element) {
        FormattingVisitor formatter = new FormattingVisitor();
        NodeTraversor.traverse(formatter, element); // walk the DOM, and call .head() and .tail() for each node

        return formatter.toString();
    }
1313638
public static String serialize(Element element) {
        StringWriter sw = new StringWriter();
        serialize(new DOMSource(element), sw);
        return sw.toString();
    }
1172819
static XsdElement getBaseFromElement(XsdElement element) {
        XsdExtension extension = getXsdExtension(element);

        return extension != null ? extension.getBase(): null;
    }
750088
public static String getInnerText(Node node)
	{
		if (node instanceof Element)
			return ((Element)node).getTextContent();
		if (node.getNodeType() == Node.TEXT_NODE)
			return node.getNodeValue();
		if (node instanceof Text)
			return ((Text)node).getData();
		return null;
	}
128082
private static String getTextContent(final Element element) {
		if (element != null) {
			String content = element.getTextContent();
			if (content != null) {
				content = content.trim();
			}
			return content;
		}
		return null;
	}