code: private void addRootElement() {
          if (root instanceof Document) {
              // Get the single element child of the document node.
              // There could be a doctype node and comment nodes that we must skip.
              Element element = DOMHelper.getFirstChildElement(root);
              Assert.notNull(element, "there should be a root element!");
              result.add(element);
          } else {
              Assert.isTrue(root instanceof Element, "root must be a document or element node!");
              result.add(root);
          }
      }
docs: Add the {@code :root} element.
  
  @see <a href="http://www.w3.org/TR/css3-selectors/#root-pseudo"><code>:root</code> pseudo-class</a>