docs: public static DocumentFragment readXMLFragment(InputStream stream, boolean skipRoot) throws IOException,
  			SAXException, ParserConfigurationException {
  		assert stream != null : AssertMessages.notNullParameter();
  		try {
  			final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
  			final DocumentBuilder builder = factory.newDocumentBuilder();
  			final Document doc = builder.parse(stream);
  
  			final DocumentFragment fragment = doc.createDocumentFragment();
  			if (skipRoot) {
  				final NodeList root = doc.getChildNodes();
  				if (root.getLength() == 0) {
  					return fragment;
  				}
  				final NodeList children = root.item(0).getChildNodes();
  				final int len = children.getLength();
  				for (int i = 0; i < len; ++i) {
  					fragment.appendChild(children.item(0));
  				}
  			} else {
  				final NodeList children = doc.getChildNodes();
  				final int len = children.getLength();
  				for (int i = 0; i < len; ++i) {
  					fragment.appendChild(children.item(i));
  				}
  			}
  			return fragment;
  		} finally {
  			stream.close();
  		}
  	}