| 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 | <html> |
| 3 | <head> |
| 4 | <link rel="STYLESHEET" href="lib.css" type='text/css' /> |
| 5 | <link rel="SHORTCUT ICON" href="../icons/pyfav.png" type="image/png" /> |
| 6 | <link rel='start' href='../index.html' title='Python Documentation Index' /> |
| 7 | <link rel="first" href="lib.html" title='Python Library Reference' /> |
| 8 | <link rel='contents' href='contents.html' title="Contents" /> |
| 9 | <link rel='index' href='genindex.html' title='Index' /> |
| 10 | <link rel='last' href='about.html' title='About this document...' /> |
| 11 | <link rel='help' href='about.html' title='About this document...' /> |
| 12 | <link rel="next" href="mmedia.html" /> |
| 13 | <link rel="prev" href="netdata.html" /> |
| 14 | <link rel="parent" href="lib.html" /> |
| 15 | <link rel="next" href="module-HTMLParser.html" /> |
| 16 | <meta name='aesop' content='information' /> |
| 17 | <title>13. Structured Markup Processing Tools </title> |
| 18 | </head> |
| 19 | <body> |
| 20 | <DIV CLASS="navigation"> |
| 21 | <div id='top-navigation-panel' xml:id='top-navigation-panel'> |
| 22 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 23 | <tr> |
| 24 | <td class='online-navigation'><a rel="prev" title="12.20.5 Examples" |
| 25 | href="node636.html"><img src='../icons/previous.png' |
| 26 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 27 | <td class='online-navigation'><a rel="parent" title="Python Library Reference" |
| 28 | href="lib.html"><img src='../icons/up.png' |
| 29 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 30 | <td class='online-navigation'><a rel="next" title="13.1 HTMLParser " |
| 31 | href="module-HTMLParser.html"><img src='../icons/next.png' |
| 32 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 33 | <td align="center" width="100%">Python Library Reference</td> |
| 34 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 35 | href="contents.html"><img src='../icons/contents.png' |
| 36 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 37 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 38 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 39 | <td class='online-navigation'><a rel="index" title="Index" |
| 40 | href="genindex.html"><img src='../icons/index.png' |
| 41 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 42 | </tr></table> |
| 43 | <div class='online-navigation'> |
| 44 | <b class="navlabel">Previous:</b> |
| 45 | <a class="sectref" rel="prev" href="node636.html">12.20.5 Examples</A> |
| 46 | <b class="navlabel">Up:</b> |
| 47 | <a class="sectref" rel="parent" href="lib.html">Python Library Reference</A> |
| 48 | <b class="navlabel">Next:</b> |
| 49 | <a class="sectref" rel="next" href="module-HTMLParser.html">13.1 HTMLParser </A> |
| 50 | </div> |
| 51 | <hr /></div> |
| 52 | </DIV> |
| 53 | <!--End of Navigation Panel--> |
| 54 | |
| 55 | <H1><A NAME="SECTION0015000000000000000000"></A><A NAME="markup"></A> |
| 56 | <BR> |
| 57 | 13. Structured Markup Processing Tools |
| 58 | |
| 59 | </H1> |
| 60 | |
| 61 | <P> |
| 62 | Python supports a variety of modules to work with various forms of |
| 63 | structured data markup. This includes modules to work with the |
| 64 | Standard Generalized Markup Language (SGML) and the Hypertext Markup |
| 65 | Language (HTML), and several interfaces for working with the |
| 66 | Extensible Markup Language (XML). |
| 67 | |
| 68 | <P> |
| 69 | It is important to note that modules in the <tt class="module">xml</tt> package |
| 70 | require that there be at least one SAX-compliant XML parser available. |
| 71 | Starting with Python 2.3, the Expat parser is included with Python, so |
| 72 | the <tt class="module"><a href="module-xml.parsers.expat.html">xml.parsers.expat</a></tt> module will always be available. |
| 73 | You may still want to be aware of the <a class="ulink" href="http://pyxml.sourceforge.net/" |
| 74 | >PyXML add-on |
| 75 | package</a>; that package provides an |
| 76 | extended set of XML libraries for Python. |
| 77 | |
| 78 | <P> |
| 79 | The documentation for the <tt class="module">xml.dom</tt> and <tt class="module">xml.sax</tt> |
| 80 | packages are the definition of the Python bindings for the DOM and SAX |
| 81 | interfaces. |
| 82 | |
| 83 | <P> |
| 84 | <table class='synopsistable' valign='baseline'> |
| 85 | <tr class='oddrow'> |
| 86 | <td><b><tt class='module'><a href='module-HTMLParser.html'>HTMLParser</a></tt></b></td> |
| 87 | <td> </td> |
| 88 | <td class='synopsis'>A simple parser that can handle HTML and XHTML.</td></tr> |
| 89 | <tr><td><b><tt class='module'><a href='module-sgmllib.html'>sgmllib</a></tt></b></td> |
| 90 | <td> </td> |
| 91 | <td class='synopsis'>Only as much of an SGML parser as needed to parse HTML.</td></tr> |
| 92 | <tr class='oddrow'> |
| 93 | <td><b><tt class='module'><a href='module-htmllib.html'>htmllib</a></tt></b></td> |
| 94 | <td> </td> |
| 95 | <td class='synopsis'>A parser for HTML documents.</td></tr> |
| 96 | <tr><td><b><tt class='module'><a href='module-htmlentitydefs.html'>htmlentitydefs</a></tt></b></td> |
| 97 | <td> </td> |
| 98 | <td class='synopsis'>Definitions of HTML general entities.</td></tr> |
| 99 | <tr class='oddrow'> |
| 100 | <td><b><tt class='module'><a href='module-xml.parsers.expat.html'>xml.parsers.expat</a></tt></b></td> |
| 101 | <td> </td> |
| 102 | <td class='synopsis'>An interface to the Expat non-validating XML parser.</td></tr> |
| 103 | <tr><td><b><tt class='module'><a href='module-xml.dom.html'>xml.dom</a></tt></b></td> |
| 104 | <td> </td> |
| 105 | <td class='synopsis'>Document Object Model API for Python.</td></tr> |
| 106 | <tr class='oddrow'> |
| 107 | <td><b><tt class='module'><a href='module-xml.dom.minidom.html'>xml.dom.minidom</a></tt></b></td> |
| 108 | <td> </td> |
| 109 | <td class='synopsis'>Lightweight Document Object Model (DOM) implementation.</td></tr> |
| 110 | <tr><td><b><tt class='module'><a href='module-xml.dom.pulldom.html'>xml.dom.pulldom</a></tt></b></td> |
| 111 | <td> </td> |
| 112 | <td class='synopsis'>Support for building partial DOM trees from SAX events.</td></tr> |
| 113 | <tr class='oddrow'> |
| 114 | <td><b><tt class='module'><a href='module-xml.sax.html'>xml.sax</a></tt></b></td> |
| 115 | <td> </td> |
| 116 | <td class='synopsis'>Package containing SAX2 base classes and convenience |
| 117 | functions.</td></tr> |
| 118 | <tr><td><b><tt class='module'><a href='module-xml.sax.handler.html'>xml.sax.handler</a></tt></b></td> |
| 119 | <td> </td> |
| 120 | <td class='synopsis'>Base classes for SAX event handlers.</td></tr> |
| 121 | <tr class='oddrow'> |
| 122 | <td><b><tt class='module'><a href='module-xml.sax.saxutils.html'>xml.sax.saxutils</a></tt></b></td> |
| 123 | <td> </td> |
| 124 | <td class='synopsis'>Convenience functions and classes for use with SAX.</td></tr> |
| 125 | <tr><td><b><tt class='module'><a href='module-xml.sax.xmlreader.html'>xml.sax.xmlreader</a></tt></b></td> |
| 126 | <td> </td> |
| 127 | <td class='synopsis'>Interface which SAX-compliant XML parsers must implement.</td></tr> |
| 128 | <tr class='oddrow'> |
| 129 | <td><b><tt class='module'><a href='module-xmllib.html'>xmllib</a></tt></b></td> |
| 130 | <td> </td> |
| 131 | <td class='synopsis'>A parser for XML documents.</td></tr> |
| 132 | </table> |
| 133 | |
| 134 | <BR> |
| 135 | <P> |
| 136 | <div class="seealso"> |
| 137 | <p class="heading">See Also:</p> |
| 138 | |
| 139 | <dl compact="compact" class="seetitle"> |
| 140 | <dt><em class="citetitle"><a href="http://pyxml.sourceforge.net/" |
| 141 | >Python/XML Libraries</a></em></dt> |
| 142 | <dd>Home page for the PyXML package, containing an extension |
| 143 | of <tt class="module">xml</tt> package bundled with Python.</dd> |
| 144 | </dl> |
| 145 | </div> |
| 146 | |
| 147 | <DIV CLASS="navigation"> |
| 148 | <div class='online-navigation'> |
| 149 | <p></p><hr /> |
| 150 | <table align="center" width="100%" cellpadding="0" cellspacing="2"> |
| 151 | <tr> |
| 152 | <td class='online-navigation'><a rel="prev" title="12.20.5 Examples" |
| 153 | href="node636.html"><img src='../icons/previous.png' |
| 154 | border='0' height='32' alt='Previous Page' width='32' /></A></td> |
| 155 | <td class='online-navigation'><a rel="parent" title="Python Library Reference" |
| 156 | href="lib.html"><img src='../icons/up.png' |
| 157 | border='0' height='32' alt='Up One Level' width='32' /></A></td> |
| 158 | <td class='online-navigation'><a rel="next" title="13.1 HTMLParser " |
| 159 | href="module-HTMLParser.html"><img src='../icons/next.png' |
| 160 | border='0' height='32' alt='Next Page' width='32' /></A></td> |
| 161 | <td align="center" width="100%">Python Library Reference</td> |
| 162 | <td class='online-navigation'><a rel="contents" title="Table of Contents" |
| 163 | href="contents.html"><img src='../icons/contents.png' |
| 164 | border='0' height='32' alt='Contents' width='32' /></A></td> |
| 165 | <td class='online-navigation'><a href="modindex.html" title="Module Index"><img src='../icons/modules.png' |
| 166 | border='0' height='32' alt='Module Index' width='32' /></a></td> |
| 167 | <td class='online-navigation'><a rel="index" title="Index" |
| 168 | href="genindex.html"><img src='../icons/index.png' |
| 169 | border='0' height='32' alt='Index' width='32' /></A></td> |
| 170 | </tr></table> |
| 171 | <div class='online-navigation'> |
| 172 | <b class="navlabel">Previous:</b> |
| 173 | <a class="sectref" rel="prev" href="node636.html">12.20.5 Examples</A> |
| 174 | <b class="navlabel">Up:</b> |
| 175 | <a class="sectref" rel="parent" href="lib.html">Python Library Reference</A> |
| 176 | <b class="navlabel">Next:</b> |
| 177 | <a class="sectref" rel="next" href="module-HTMLParser.html">13.1 HTMLParser </A> |
| 178 | </div> |
| 179 | </div> |
| 180 | <hr /> |
| 181 | <span class="release-info">Release 2.4.2, documentation updated on 28 September 2005.</span> |
| 182 | </DIV> |
| 183 | <!--End of Navigation Panel--> |
| 184 | <ADDRESS> |
| 185 | See <i><a href="about.html">About this document...</a></i> for information on suggesting changes. |
| 186 | </ADDRESS> |
| 187 | </BODY> |
| 188 | </HTML> |