The exception is actually correct, there is no document to parse here.
However, given that the parser tries to recover from parse errors, It can be argued that it should return a document regardless, i.e. it should create an empty tag and return that.
The exception is actually correct, there is no document to parse here.
However, given that the parser tries to recover from parse errors, It can be argued that it should return a document regardless, i.e. it should create an empty tag and return that.
Patches welcome.