reads the given document and parses it with the expat parser.
There is no validation enabled. The parameter to withExpat determines, whether parsing
is done strict. Here strict parsing is enabled. When strict parsing is used,
the parse is immediately checked for parser errors, and possible errors are issued.
When set to non-strict parsing, error checking is delayed and may be done later
with the issueExpatErr arrow.

When HTML parsing is enabled, the expat parser will be configured with the HTML enitity reference
resolver, else only the predefined XML enitities will be substituted.