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

Function parse

Lib/xml/dom/minidom.py:1997–2005  ·  view source on GitHub ↗

Parse a file into a DOM by filename or file object.

(file, parser=None, bufsize=None)

Source from the content-addressed store, hash-verified

1995 return rootNode
1996
1997def parse(file, parser=None, bufsize=None):
1998 """Parse a file into a DOM by filename or file object."""
1999 if parser is None and not bufsize:
2000 from xml.dom import expatbuilder
2001 return expatbuilder.parse(file)
2002 else:
2003 from xml.dom import pulldom
2004 return _do_pulldom_parse(pulldom.parse, (file,),
2005 {'parser': parser, 'bufsize': bufsize})
2006
2007def parseString(string, parser=None):
2008 """Parse a file into a DOM from a string."""

Callers 9

testParseFromTextFileMethod · 0.90
testAppendChildMethod · 0.90
testNonZeroMethod · 0.90
testUnlinkMethod · 0.90
testContextMethod · 0.90
testDocRemoveChildMethod · 0.90

Calls 2

_do_pulldom_parseFunction · 0.85
parseMethod · 0.45

Tested by 9

testParseFromTextFileMethod · 0.72
testAppendChildMethod · 0.72
testNonZeroMethod · 0.72
testUnlinkMethod · 0.72
testContextMethod · 0.72
testDocRemoveChildMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…