|
21 | 21 | def getTreeWalker(treeType, implementation=None, **kwargs): |
22 | 22 | """Get a TreeWalker class for various types of tree with built-in support |
23 | 23 |
|
24 | | - treeType - the name of the tree type required (case-insensitive). Supported |
25 | | - values are: |
26 | | -
|
27 | | - "dom" - The xml.dom.minidom DOM implementation |
28 | | - "etree" - A generic walker for tree implementations exposing an |
29 | | - elementtree-like interface (known to work with |
30 | | - ElementTree, cElementTree and lxml.etree). |
31 | | - "lxml" - Optimized walker for lxml.etree |
32 | | - "genshi" - a Genshi stream |
33 | | -
|
34 | | - implementation - (Currently applies to the "etree" tree type only). A module |
35 | | - implementing the tree type e.g. xml.etree.ElementTree or |
36 | | - cElementTree.""" |
| 24 | + Args: |
| 25 | + treeType (str): the name of the tree type required (case-insensitive). |
| 26 | + Supported values are: |
| 27 | +
|
| 28 | + - "dom": The xml.dom.minidom DOM implementation |
| 29 | + - "etree": A generic walker for tree implementations exposing an |
| 30 | + elementtree-like interface (known to work with |
| 31 | + ElementTree, cElementTree and lxml.etree). |
| 32 | + - "lxml": Optimized walker for lxml.etree |
| 33 | + - "genshi": a Genshi stream |
| 34 | +
|
| 35 | + Implementation: A module implementing the tree type e.g. |
| 36 | + xml.etree.ElementTree or cElementTree (Currently applies to the |
| 37 | + "etree" tree type only). |
| 38 | + """ |
37 | 39 |
|
38 | 40 | treeType = treeType.lower() |
39 | 41 | if treeType not in treeWalkerCache: |
|
0 commit comments