code: public Element createAnonymousElement(Document doc, String name, String display)
      {
          Element div = doc.createElement(name);
          div.setAttribute("class", "Xanonymous");
          div.setAttribute("style", "display:" + display);
          return div;
      }
docs: Creates a new DOM element that represents an anonymous box in a document.
  @param doc the document
  @param name the anonymous element name (generally arbitrary)
  @param display the display style value for the block
  @return the new element