Java XML Element Check isAppearanceTag(Element e)

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

Description

is Appearance Tag

License

Open Source License

Declaration

public static boolean isAppearanceTag(Element e) 

Method Source Code

//package com.java2s;

import org.w3c.dom.Element;

public class Main {

    public static boolean isAppearanceTag(Element e) {
        //headings
        if (e.getTagName().matches("H[1-9]")) {
            return true;
        }//from  www  .  j a  v  a 2s.c  o m
        //colored fonts
        if (e.getTagName().equals("FONT") && !e.getAttribute("COLOR").equals("")) {
            return true;
        }
        //stronged texts
        if (e.getTagName().matches("[B|I|STRONG]")) {
            return true;
        }
        return false;
    }
}

Related

  1. is(final Element e, final String tag)
  2. isAncestor(Element candAnc, Node cand)
  3. isAsyncEventQueue(Element element)
  4. isComputedGoal(final Element element)
  5. isElement(XMLStreamReader xmlRdr, int eventType, String tagName)
  6. isElementExistsByTagName(final Element element, final String tagName)