code: public static String removeDeclaration(String xml) {
          Matcher matcher = DECL_PATTERN.matcher(xml);
          return matcher.replaceFirst("");
      }
docs: Removes XML declaration (if present).
  @param xml XML to remove declaration from.
  @return XML without declaration.