code: public static ContentEditor getEditor(String type, InputStream data)
              throws IOException {
          ContentEditor editor = (ContentEditor) s_editors.get(type);
          if (editor == null && type.endsWith("+xml")) {
              editor = (ContentEditor) s_editors.get("text/xml");
          }
          return (ContentEditor) editor.newInstance(type, data, false);
      }
docs: Get an editor for the given type, initialized with the given data. This
  should only be called if the caller knows there is an editor for the
  type.