create a domdocument from stdin