Creates a Document
from only the document element.
Creates a Document
from only the document element. The URI is empty, and so are the collections of top-level
comments and processing instructions.
Creates a Document
from only the document element and optional URI.
Creates a Document
from only the document element and optional URI. The collections of top-level
comments and processing instructions are empty, and the optional XML declaration is absent.
Creates a Document
from an optional URI, an optional XML declaration, the document element, and the top-level comments and processing
instructions, if any.
Creates a Document
from an optional URI, an optional XML declaration, the document element, and the top-level comments and processing
instructions, if any. Unlike the primary constructor, this factory method defaults the processing instructions and
comments to empty collections. In other words, only the optional URI and the document element are mandatory parameters.
Creates a Document
from an optional URI, an optional XML declaration, and the document children.
Creates a Document
from an optional URI, an optional XML declaration, and the document children.
Precisely one of the document children must be an element. This factory method retains the order of
document children, whether any comments are before or after the root element.