> So there is no way to do this according to the XQuery specification?
If your processor supports the data: URI scheme then you can use
doc(concat('data:text/xml,',$string))
to generate a document node resulting from parsing a string, otherwise
you'll most likely need an extension function.
David