MCPcopy Index your code
hub / github.com/python/cpython / parseFragmentString

Function parseFragmentString

Lib/xml/dom/expatbuilder.py:945–954  ·  view source on GitHub ↗

Parse a fragment of a document from a string, given the context from which it was originally extracted. context should be the parent of the node(s) which are in the fragment.

(string, context, namespaces=True)

Source from the content-addressed store, hash-verified

943
944
945def parseFragmentString(string, context, namespaces=True):
946 """Parse a fragment of a document from a string, given the context
947 from which it was originally extracted. context should be the
948 parent of the node(s) which are in the fragment.
949 """
950 if namespaces:
951 builder = FragmentBuilderNS(context)
952 else:
953 builder = FragmentBuilder(context)
954 return builder.parseString(string)
955
956
957def makeBuilder(options):

Callers

nothing calls this directly

Calls 3

parseStringMethod · 0.95
FragmentBuilderNSClass · 0.85
FragmentBuilderClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…