code: public static String wrapXMLInRootElement(final String xml) {
  		// The XML may not need to be wrapped.
  		if (xml.startsWith("<?xml") || xml.startsWith("<!DOCTYPE")) {
  			return xml;
  		} else {
  			// ENTITY definition required for NBSP.
  			// ui namepsace required for xml theme.
  			return XMLUtil.XML_DECLARATION + "<ui:root" + XMLUtil.STANDARD_NAMESPACES + ">" + xml + "</ui:root>";
  		}
  	}
docs: Wrap the XML in a root element before validating.
  
  @param xml the XML to wrap
  @return the XML wrapped in a root element