Java XML Element Check isInfoNode(Element e)

Here you can find the source of isInfoNode(Element e)

Description

is this Node is information node?

License

Open Source License

Parameter

Parameter Description
e a parameter

Return

Whether this Node is information node

Declaration

public static boolean isInfoNode(Element e) 

Method Source Code

//package com.java2s;

import org.w3c.dom.Element;

public class Main {
    private static final String[] INFO_NODE = { "P", "SPAN", "H1", "H2", "B", "I" };

    /**/*from  w  ww.  j a va2 s.  co  m*/
     * is this Node is information node?
     * 
     * @param e
     * @return Whether this Node is information node
     */
    public static boolean isInfoNode(Element e) {
        for (String s : INFO_NODE) {
            if (e.getTagName().equals(s)) {
                return true;
            }
        }
        return false;
    }
}

Related

  1. isEmpty(final Element el)
  2. isEmptyElement(Element el)
  3. isExtension(Element element)
  4. isGateway(Element element)
  5. isHTMLElement(Element elem)
  6. isLeaf(Element element)
  7. isLinkNode(Element e)
  8. isLocalName(Element element, String name)
  9. isMuleNamespace(Element element)