Ejemplo n.º 1
0
 /**
  * @param element the element.
  * @return a string representation of the element including its attributes.
  */
 public static String getElementString(Element element) {
   if (element == null) {
     return "";
   }
   String text = Helper.removeNewLines(Helper.getTextValue(element)).trim();
   String info = "";
   if (!text.equals("")) {
     info += "\"" + text + "\" ";
     // Helper.removeNewLines(this.text.trim()) + " - ";
   }
   if (element != null) {
     if (element.hasAttribute("id")) {
       info += "ID: " + element.getAttribute("id") + " ";
     }
     info += Helper.getAllElementAttributes(element) + " ";
   }
   return info;
 }