def parseFragmentString(string, context, namespaces=True):
 if namespaces:
  builder = FragmentBuilderNS(context)
 else:
  builder = FragmentBuilder(context)
 return builder.parseString(string)

def parseFragmentString ( string , context , namespaces = True ) : if namespaces : builder = FragmentBuilderNS ( context ) else : builder = FragmentBuilder ( context ) return builder . parseString ( string )
parse a fragment of a document from a string .