Here you can find the source of isAppearanceTag(Element e)
public static boolean isAppearanceTag(Element e)
//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; } }