Java Utililty Methods XML Node Name

List of utility methods to do XML Node Name

Description

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

Method

StringgetTagName(Node tag, boolean useJsfcTags)
Returns the name for the tag
String tagName = tag.getNodeName();
if (useJsfcTags) {
    if (tagName.indexOf(':') > 0) {
        return tagName;
    if (!(tag instanceof Element))
        return tagName;
    Element element = (Element) tag;
...
StringgetTagNameWithoutPrefix(Node node)
get Tag Name Without Prefix
if (node == null || node.getNodeName() == null) {
    return null;
String prefix = node.getPrefix();
String nodeName = node.getNodeName();
String resVal = nodeName;
if ((prefix != null && prefix.trim().length() > 0) || nodeName.indexOf(':') != -1) {
    resVal = nodeName.substring(nodeName.indexOf(':') + 1);
...
intgetTifDimension(Node node, String nodeName)
get Tif Dimension
int dim = -1;
if (node.getNodeName().equalsIgnoreCase("tiffifd")) {
    Node child = node.getFirstChild();
    while (child != null) {
        if (child.getNodeName().equalsIgnoreCase("tifffield")) {
            NamedNodeMap map = child.getAttributes();
            if (map.getNamedItem("name") != null
                    && map.getNamedItem("name").getNodeValue().equalsIgnoreCase(nodeName)) {
...
StringgetUnqualifiedNodeName(org.w3c.dom.Node node)
get Unqualified Node Name
String retval = node.getNodeName();
retval = retval.substring(retval.indexOf(":") + 1);
return retval;
booleanisMatchNodeName(Node node, String node_name)
is Match Node Name
if (node == null || node_name == null)
    return false;
return node.getNodeName().equals(node_name);