Java XML Node Value Check isCreateInstanceSet(Node node)

Here you can find the source of isCreateInstanceSet(Node node)

Description

Checks whether the optional attribute createInstance is set for a specific node.

License

Open Source License

Parameter

Parameter Description
node a parameter

Return

whether the attribute createInstance is set

Declaration

public static boolean isCreateInstanceSet(Node node) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.Node;

public class Main {
    /**//www.java2s  . c  om
     * Checks whether the optional attribute createInstance is set for 
     * a specific node. That relates to receive and pick activities.
     * 
     * @param node
     * @return whether the attribute createInstance is set
     */
    public static boolean isCreateInstanceSet(Node node) {
        boolean createInstance = false;
        if (node.getAttributes().getNamedItem("createInstance") != null) {
            if (node.getAttributes().getNamedItem("createInstance").getNodeValue().equalsIgnoreCase("yes"))
                createInstance = true;
        }
        return createInstance;
    }
}

Related

  1. isCommentAllowed(Node node)
  2. isCommentNode(Node node)
  3. isContainerElement(Node node)
  4. isElementNodeExist(Node root, String nodeString)
  5. isElementNodeOfType(final Node n, final String type)
  6. isElementType(Node _node)
  7. isEmpty(Node node)