List of utility methods to do XML Element Value Get
String | getCData(Element element) Extract the CDATA content of the specified element. CDATASection text = getCDataNode(element);
return (text == null) ? null : text.getData().trim();
|
String | getContent(Element xmlElement) Get the content value for the given XML element if (xmlElement == null) { throw new IllegalArgumentException("xmlElement cannot be null"); StringBuilder content = new StringBuilder(); for (Node childNode = xmlElement.getFirstChild(); childNode != null; childNode = childNode .getNextSibling()) { if (childNode.getNodeType() == Node.TEXT_NODE) { content.append(childNode.getNodeValue()); ... |
String | getElementText(Element element) get Element Text StringBuilder text = new StringBuilder(); NodeList childNodes = element.getChildNodes(); int numChildren = childNodes.getLength(); for (int j = 0; j < numChildren; j++) { text.append(childNodes.item(j).getNodeValue()); return text.toString(); |
Integer | getIntegerValue(String tag, Element element) get Integer Value return Integer.parseInt(getStringValue(tag, element), 10);
|