return document fragments for multiple top level nodes

When a string of multiple top level nodes is present, create a document
fragment to contain them.

<p>foo</p><p>bar</p> will result in a document fragment