Java Utililty Methods XML Node Read

List of utility methods to do XML Node Read

Description

The list of methods to do XML Node Read are organized into topic(s).

Method

doublereadDouble(Node node)
Returns the double value represented by the contents of the given node.
return Double.parseDouble(readString(node));
MapreadNodeElementsToMap(final Node sourceNode)
For the given sourceNode , read each "top level" element into the resulting Map .
Map<String, String> result = new HashMap<String, String>();
if (sourceNode == null) {
    return result;
NodeList childNodes = sourceNode.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
    Node element = childNodes.item(i);
    if (element.getNodeType() == Node.ELEMENT_NODE) {
...
StringreadText(Node element)
read Text
if (element == null)
    return "";
else
    return element.getTextContent();