parseFragment(file, context, namespaces=1)
Parse a fragment of a document, given the context from which it was originally extracted. context should be the parent of the node(s) which are in the fragment.
file
may be either a file name or an open file object.