protected final boolean isElementSpacePreserved(Element element) {
      final Attribute attr = element.attribute("space");
      boolean preserveFound=preserve; //default to global state
      if (attr!=null) {
        if ("xml".equals(attr.getNamespacePrefix()) &&
            "preserve".equals(attr.getText())) {
          preserveFound = true;
        }
        else {
          preserveFound = false;
        }
      }
      return preserveFound;
    }
Determines if element is a special case of XML elements
where it contains an xml:space attribute of "preserve".
If it does, then retain whitespace.
@param element the element to check
@return {@code true} if whitespace should be preserved, otherwise {@code false}
xmppserver/src/main/java/org/jivesoftware/util/XMLWriter.java