Reads the entire document.

This function returns an array with the following three elements:
* name - The root element name.
* value - The value for the root element.
* attributes - An array of attributes.

This function will also disable the standard libxml error handler (which
usually just results in PHP errors), and throw exceptions instead.