Java Utililty Methods XML Node Value Check

List of utility methods to do XML Node Value Check

Description

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

Method

booleanisSubTagExist(Node node, String tagName)
is Sub Tag Exist
if (node == null) {
    return false;
NodeList nodeList = node.getChildNodes();
for (int i = 0; i < nodeList.getLength(); i++) {
    Node n = nodeList.item(i);
    if (n instanceof Element) {
        if (((Element) n).getTagName().equals(tagName)) {
...
booleanisSuppressJoinFailure(Node node)
Checks whether the Boolean attribute suppressJoinFailure is set at the BPEL activity represented by the node.
boolean result = false;
if (node.getAttributes() != null) {
    if (node.getAttributes().getNamedItem("suppressJoinFailure") != null) {
        if (node.getAttributes().getNamedItem("suppressJoinFailure").getNodeValue()
                .equalsIgnoreCase("yes")) {
            result = true;
    } else {
...
booleanisSynchronousInvoke(Node invoke)
Checks whether an invoke activity is synchronous or not.
if (!invoke.getNodeName().equalsIgnoreCase("invoke"))
    return false;
boolean isSynchronousInvoke = false;
if (invoke.getAttributes().getNamedItem("outputVariable") != null)
    isSynchronousInvoke = true;
for (Node child = invoke.getFirstChild(); child != null; child = child.getNextSibling()) {
    if (child.getNodeName().equalsIgnoreCase("toParts")) {
        isSynchronousInvoke = true;
...
booleanisText(final Node n)
is Text
return n instanceof Text;
booleanisText(Node node)
is Text
int ntype = node.getNodeType();
return ntype == Node.TEXT_NODE || ntype == Node.CDATA_SECTION_NODE;
booleanisText(Node node)
is Text
int ntype = node.getNodeType();
return ntype == Node.TEXT_NODE || ntype == Node.CDATA_SECTION_NODE;
booleanisText(Node node)
is Text
return node.getNodeType() == Node.TEXT_NODE || node.getNodeType() == Node.CDATA_SECTION_NODE;
booleanisValidNode(Node node, String name)
is Valid Node
return node.getNodeName().equals(name);
booleanisWhiteSpace(Node node)
is White Space
return node != null && node.getNodeType() == Node.TEXT_NODE && node.getNodeValue().trim().length() == 0;
booleanisWhitespace(Node node)
test if a node is a text node that contains just whitespace.
if (node != null && node.getNodeType() == Node.TEXT_NODE) {
    String text = node.getNodeValue();
    Matcher m = _whitespacePattern.matcher(text);
    if (m.matches()) {
        return true;
return false;
...