PageRenderTime 94ms CodeModel.GetById 33ms RepoModel.GetById 1ms app.codeStats 0ms

/desktop/core/ext-py/lxml/doc/html/api/lxml.html.ElementSoup-module.html

https://github.com/jcrobak/hue
HTML | 278 lines | 236 code | 17 blank | 25 comment | 0 complexity | 9bbe2b5fc36f92c656982fbd8adf1be4 MD5 | raw file
  1. <?xml version="1.0" encoding="ascii"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3. "DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5. <head>
  6. <title>lxml.html.ElementSoup</title>
  7. <link rel="stylesheet" href="epydoc.css" type="text/css" />
  8. <script type="text/javascript" src="epydoc.js"></script>
  9. </head>
  10. <body bgcolor="white" text="black" link="blue" vlink="#204080"
  11. alink="#204080">
  12. <!-- ==================== NAVIGATION BAR ==================== -->
  13. <table class="navbar" border="0" width="100%" cellpadding="0"
  14. bgcolor="#a0c0ff" cellspacing="0">
  15. <tr valign="middle">
  16. <!-- Home link -->
  17. <th>&nbsp;&nbsp;&nbsp;<a
  18. href="lxml-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
  19. <!-- Tree link -->
  20. <th>&nbsp;&nbsp;&nbsp;<a
  21. href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
  22. <!-- Index link -->
  23. <th>&nbsp;&nbsp;&nbsp;<a
  24. href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
  25. <!-- Help link -->
  26. <th>&nbsp;&nbsp;&nbsp;<a
  27. href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
  28. <!-- Project homepage -->
  29. <th class="navbar" align="right" width="100%">
  30. <table border="0" cellpadding="0" cellspacing="0">
  31. <tr><th class="navbar" align="center"
  32. ><a class="navbar" target="_top" href="http://codespeak.net/lxml/">lxml API</a></th>
  33. </tr></table></th>
  34. </tr>
  35. </table>
  36. <table width="100%" cellpadding="0" cellspacing="0">
  37. <tr valign="top">
  38. <td width="100%">
  39. <span class="breadcrumbs">
  40. <a href="lxml-module.html">Package&nbsp;lxml</a> ::
  41. <a href="lxml.html-module.html">Package&nbsp;html</a> ::
  42. Module&nbsp;ElementSoup
  43. </span>
  44. </td>
  45. <td>
  46. <table cellpadding="0" cellspacing="0">
  47. <!-- hide/show private -->
  48. <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
  49. onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
  50. <tr><td align="right"><span class="options"
  51. >[<a href="frames.html" target="_top">frames</a
  52. >]&nbsp;|&nbsp;<a href="lxml.html.ElementSoup-module.html"
  53. target="_top">no&nbsp;frames</a>]</span></td></tr>
  54. </table>
  55. </td>
  56. </tr>
  57. </table>
  58. <!-- ==================== MODULE DESCRIPTION ==================== -->
  59. <h1 class="epydoc">Module ElementSoup</h1><p class="nomargin-top"><span class="codelink"><a href="lxml.html.ElementSoup-pysrc.html">source&nbsp;code</a></span></p>
  60. Legacy interface to the BeautifulSoup HTML parser.
  61. <!-- ==================== FUNCTIONS ==================== -->
  62. <a name="section-Functions"></a>
  63. <table class="summary" border="1" cellpadding="3"
  64. cellspacing="0" width="100%" bgcolor="white">
  65. <tr bgcolor="#70b0f0" class="table-header">
  66. <td colspan="2" class="table-header">
  67. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  68. <tr valign="top">
  69. <td align="left"><span class="table-header">Functions</span></td>
  70. <td align="right" valign="top"
  71. ><span class="options">[<a href="#section-Functions"
  72. class="privatelink" onclick="toggle_private();"
  73. >hide private</a>]</span></td>
  74. </tr>
  75. </table>
  76. </td>
  77. </tr>
  78. <tr>
  79. <td width="15%" align="right" valign="top" class="summary">
  80. <span class="summary-type">&nbsp;</span>
  81. </td><td class="summary">
  82. <table width="100%" cellpadding="0" cellspacing="0" border="0">
  83. <tr>
  84. <td><span class="summary-sig"><a href="lxml.html.ElementSoup-module.html#convert_tree" class="summary-sig-name">convert_tree</a>(<span class="summary-sig-arg">beautiful_soup_tree</span>,
  85. <span class="summary-sig-arg">makeelement</span>=<span class="summary-sig-default">None</span>)</span><br />
  86. Convert a BeautifulSoup tree to a list of Element trees.</td>
  87. <td align="right" valign="top">
  88. <span class="codelink"><a href="lxml.html.soupparser-pysrc.html#convert_tree">source&nbsp;code</a></span>
  89. </td>
  90. </tr>
  91. </table>
  92. </td>
  93. </tr>
  94. <tr>
  95. <td width="15%" align="right" valign="top" class="summary">
  96. <span class="summary-type">&nbsp;</span>
  97. </td><td class="summary">
  98. <table width="100%" cellpadding="0" cellspacing="0" border="0">
  99. <tr>
  100. <td><span class="summary-sig"><a name="parse"></a><span class="summary-sig-name">parse</span>(<span class="summary-sig-arg">file</span>,
  101. <span class="summary-sig-arg">beautifulsoup</span>=<span class="summary-sig-default">None</span>,
  102. <span class="summary-sig-arg">makeelement</span>=<span class="summary-sig-default">None</span>)</span></td>
  103. <td align="right" valign="top">
  104. <span class="codelink"><a href="lxml.html.ElementSoup-pysrc.html#parse">source&nbsp;code</a></span>
  105. </td>
  106. </tr>
  107. </table>
  108. </td>
  109. </tr>
  110. </table>
  111. <!-- ==================== VARIABLES ==================== -->
  112. <a name="section-Variables"></a>
  113. <table class="summary" border="1" cellpadding="3"
  114. cellspacing="0" width="100%" bgcolor="white">
  115. <tr bgcolor="#70b0f0" class="table-header">
  116. <td colspan="2" class="table-header">
  117. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  118. <tr valign="top">
  119. <td align="left"><span class="table-header">Variables</span></td>
  120. <td align="right" valign="top"
  121. ><span class="options">[<a href="#section-Variables"
  122. class="privatelink" onclick="toggle_private();"
  123. >hide private</a>]</span></td>
  124. </tr>
  125. </table>
  126. </td>
  127. </tr>
  128. <tr class="private">
  129. <td width="15%" align="right" valign="top" class="summary">
  130. <span class="summary-type">&nbsp;</span>
  131. </td><td class="summary">
  132. <a href="lxml.html.ElementSoup-module.html#__doc__" class="summary-name" onclick="show_private();">__doc__</a> = <code title="&quot;&quot;&quot;Legacy interface to the BeautifulSoup HTML parser.
  133. &quot;&quot;&quot;">&quot;&quot;&quot;Legacy interface to the BeautifulSoup HTML pars<code class="variable-ellipsis">...</code></code>
  134. </td>
  135. </tr>
  136. </table>
  137. <!-- ==================== FUNCTION DETAILS ==================== -->
  138. <a name="section-FunctionDetails"></a>
  139. <table class="details" border="1" cellpadding="3"
  140. cellspacing="0" width="100%" bgcolor="white">
  141. <tr bgcolor="#70b0f0" class="table-header">
  142. <td colspan="2" class="table-header">
  143. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  144. <tr valign="top">
  145. <td align="left"><span class="table-header">Function Details</span></td>
  146. <td align="right" valign="top"
  147. ><span class="options">[<a href="#section-FunctionDetails"
  148. class="privatelink" onclick="toggle_private();"
  149. >hide private</a>]</span></td>
  150. </tr>
  151. </table>
  152. </td>
  153. </tr>
  154. </table>
  155. <a name="convert_tree"></a>
  156. <div>
  157. <table class="details" border="1" cellpadding="3"
  158. cellspacing="0" width="100%" bgcolor="white">
  159. <tr><td>
  160. <table width="100%" cellpadding="0" cellspacing="0" border="0">
  161. <tr valign="top"><td>
  162. <h3 class="epydoc"><span class="sig"><span class="sig-name">convert_tree</span>(<span class="sig-arg">beautiful_soup_tree</span>,
  163. <span class="sig-arg">makeelement</span>=<span class="sig-default">None</span>)</span>
  164. </h3>
  165. </td><td align="right" valign="top"
  166. ><span class="codelink"><a href="lxml.html.soupparser-pysrc.html#convert_tree">source&nbsp;code</a></span>&nbsp;
  167. </td>
  168. </tr></table>
  169. <p>Convert a BeautifulSoup tree to a list of Element trees.</p>
  170. <p>Returns a list instead of a single root Element to support
  171. HTML-like soup with more than one root element.</p>
  172. <p>You can pass a different Element factory through the <code class="link">makeelement</code>
  173. keyword.</p>
  174. <dl class="fields">
  175. </dl>
  176. </td></tr></table>
  177. </div>
  178. <br />
  179. <!-- ==================== VARIABLES DETAILS ==================== -->
  180. <a name="section-VariablesDetails"></a>
  181. <table class="details" border="1" cellpadding="3"
  182. cellspacing="0" width="100%" bgcolor="white">
  183. <tr bgcolor="#70b0f0" class="table-header">
  184. <td colspan="2" class="table-header">
  185. <table border="0" cellpadding="0" cellspacing="0" width="100%">
  186. <tr valign="top">
  187. <td align="left"><span class="table-header">Variables Details</span></td>
  188. <td align="right" valign="top"
  189. ><span class="options">[<a href="#section-VariablesDetails"
  190. class="privatelink" onclick="toggle_private();"
  191. >hide private</a>]</span></td>
  192. </tr>
  193. </table>
  194. </td>
  195. </tr>
  196. </table>
  197. <a name="__doc__"></a>
  198. <div class="private">
  199. <table class="details" border="1" cellpadding="3"
  200. cellspacing="0" width="100%" bgcolor="white">
  201. <tr><td>
  202. <h3 class="epydoc">__doc__</h3>
  203. <dl class="fields">
  204. </dl>
  205. <dl class="fields">
  206. <dt>Value:</dt>
  207. <dd><table><tr><td><pre class="variable">
  208. &quot;&quot;&quot;Legacy interface to the BeautifulSoup HTML parser.
  209. &quot;&quot;&quot;
  210. </pre></td></tr></table>
  211. </dd>
  212. </dl>
  213. </td></tr></table>
  214. </div>
  215. <br />
  216. <!-- ==================== NAVIGATION BAR ==================== -->
  217. <table class="navbar" border="0" width="100%" cellpadding="0"
  218. bgcolor="#a0c0ff" cellspacing="0">
  219. <tr valign="middle">
  220. <!-- Home link -->
  221. <th>&nbsp;&nbsp;&nbsp;<a
  222. href="lxml-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
  223. <!-- Tree link -->
  224. <th>&nbsp;&nbsp;&nbsp;<a
  225. href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
  226. <!-- Index link -->
  227. <th>&nbsp;&nbsp;&nbsp;<a
  228. href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
  229. <!-- Help link -->
  230. <th>&nbsp;&nbsp;&nbsp;<a
  231. href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
  232. <!-- Project homepage -->
  233. <th class="navbar" align="right" width="100%">
  234. <table border="0" cellpadding="0" cellspacing="0">
  235. <tr><th class="navbar" align="center"
  236. ><a class="navbar" target="_top" href="http://codespeak.net/lxml/">lxml API</a></th>
  237. </tr></table></th>
  238. </tr>
  239. </table>
  240. <table border="0" cellpadding="0" cellspacing="0" width="100%%">
  241. <tr>
  242. <td align="left" class="footer">
  243. Generated by Epydoc 3.0 on Sun Jun 21 09:44:36 2009
  244. </td>
  245. <td align="right" class="footer">
  246. <a target="mainFrame" href="http://epydoc.sourceforge.net"
  247. >http://epydoc.sourceforge.net</a>
  248. </td>
  249. </tr>
  250. </table>
  251. <script type="text/javascript">
  252. <!--
  253. // Private objects are initially displayed (because if
  254. // javascript is turned off then we want them to be
  255. // visible); but by default, we want to hide them. So hide
  256. // them unless we have a cookie that says to show them.
  257. checkCookie();
  258. // -->
  259. </script>
  260. </body>
  261. </html>