mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Added a few docstrings
This commit is contained in:
parent
863d8b855f
commit
623511b7df
1 changed files with 7 additions and 0 deletions
|
@ -6,6 +6,10 @@ import types
|
||||||
"""
|
"""
|
||||||
minidom.py -- a lightweight DOM implementation based on SAX.
|
minidom.py -- a lightweight DOM implementation based on SAX.
|
||||||
|
|
||||||
|
parse( "foo.xml" )
|
||||||
|
|
||||||
|
parseString( "<foo><bar/></foo>" )
|
||||||
|
|
||||||
Todo:
|
Todo:
|
||||||
=====
|
=====
|
||||||
* convenience methods for getting elements and text.
|
* convenience methods for getting elements and text.
|
||||||
|
@ -440,7 +444,10 @@ def _doparse( func, args, kwargs ):
|
||||||
return rootNode
|
return rootNode
|
||||||
|
|
||||||
def parse( *args, **kwargs ):
|
def parse( *args, **kwargs ):
|
||||||
|
"Parse a file into a DOM by filename or file object"
|
||||||
return _doparse( pulldom.parse, args, kwargs )
|
return _doparse( pulldom.parse, args, kwargs )
|
||||||
|
|
||||||
def parseString( *args, **kwargs ):
|
def parseString( *args, **kwargs ):
|
||||||
|
"Parse a file into a DOM from a string"
|
||||||
return _doparse( pulldom.parseString, args, kwargs )
|
return _doparse( pulldom.parseString, args, kwargs )
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue