mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 15:00:18 +00:00
TOC update for xml chapter
This commit is contained in:
+3
-3
@@ -37,9 +37,9 @@ h1:before{content:""}
|
||||
<li><a href=refactoring.html>Refactoring</a>
|
||||
<li><a href=advanced-classes.html>Advanced Classes</a>
|
||||
<li class=todo>Files
|
||||
<li><a href=xml.html>XML processing</a>
|
||||
<li class=todo>HTML processing
|
||||
<li class=todo>Web services
|
||||
<li><a href=xml.html>XML</a>
|
||||
<li class=todo>HTML
|
||||
<li class=todo>HTTP
|
||||
<li class=todo>Performance tuning
|
||||
<li class=todo>Packaging Python libraries
|
||||
<li class=todo>Creating graphics with the Python Imaging Library
|
||||
|
||||
+19
-5
@@ -188,12 +188,26 @@ ul li ol{margin:0;padding:0 0 0 2.5em}
|
||||
<li>Handling errors (exceptions)
|
||||
<li>Writing to files
|
||||
</ol>
|
||||
<li>XML Processing
|
||||
<li id=xml>XML
|
||||
<ol>
|
||||
<li>...major changes afoot...
|
||||
<li><a href="http://groups.google.com/group/comp.lang.python.announce/browse_thread/thread/1539788b6ec118d9/00803392361a2ef6?show_docid=00803392361a2ef6">lxml 2.2</a> officially supports Python 3
|
||||
<li><a href=xml.html#divingin>Diving In</a>
|
||||
<li><a href=xml.html#xml-intro>A 5-Minute Crash Course in XML</a>
|
||||
<li><a href=xml.html#xml-structure>The Structure Of An Atom Feed</a>
|
||||
<li><a href=xml.html#xml-parse>Parsing XML</a>
|
||||
<ol>
|
||||
<li><a href=xml.html#xml-elements>Elements Are Lists</a>
|
||||
<li><a href=xml.html#xml-attributes>Attributes Are Dictonaries</a>
|
||||
</ol>
|
||||
<li><a href=xml.html#xml-find>Searching For Nodes Within An XML Document</a>
|
||||
<li><a href=xml.html#xml-lxml>Going Further With lxml</a>
|
||||
<ol>
|
||||
<li><a href=xml.html#xml-custom-parser>Customizing Your XML Parser</a>
|
||||
<li><a href=xml.html#xml-incremental>Incremental Parsing</a>
|
||||
</ol>
|
||||
<li><a href=xml.html#xml-generate>Generating XML</a>
|
||||
<li><a href=xml.html#furtherreading>Further Reading</a>
|
||||
</ol>
|
||||
<li>HTML processing
|
||||
<li>HTML
|
||||
<ol>
|
||||
<li>Diving in
|
||||
<li>html5lib
|
||||
@@ -206,7 +220,7 @@ ul li ol{margin:0;padding:0 0 0 2.5em}
|
||||
<li>Putting it all together
|
||||
<li>Summary
|
||||
</ol>
|
||||
<li>HTTP web services
|
||||
<li>HTTP
|
||||
<ol>
|
||||
<li>Diving in
|
||||
<li>How not to fetch data over HTTP
|
||||
|
||||
@@ -269,14 +269,15 @@ mark{display:inline}
|
||||
<p>In Etree, an element acts like a list. The items of the list are the element’s children.
|
||||
|
||||
<pre class=screen>
|
||||
>>> root.tag
|
||||
'{http://www.w3.org/2005/Atom}feed'
|
||||
>>> len(root)
|
||||
9
|
||||
>>> for child in root:
|
||||
... print(child)
|
||||
...
|
||||
<Element {http://www.w3.org/2005/Atom}title at e2b5d0>
|
||||
# continued from the previous example
|
||||
<samp class=p>>>> </samp><kbd>root.tag</kbd>
|
||||
<samp>'{http://www.w3.org/2005/Atom}feed'</samp>
|
||||
<samp class=p>>>> </samp><kbd>len(root)</kbd>
|
||||
<samp>9</kbd>
|
||||
<samp class=p>>>> </samp><kbd>for child in root:</kbd>
|
||||
<samp class=p>... </samp><kbd> print(child)</kbd>
|
||||
<samp class=p>... </samp>
|
||||
<samp><Element {http://www.w3.org/2005/Atom}title at e2b5d0>
|
||||
<Element {http://www.w3.org/2005/Atom}subtitle at e2b4e0>
|
||||
<Element {http://www.w3.org/2005/Atom}id at e2b6c0>
|
||||
<Element {http://www.w3.org/2005/Atom}updated at e2b6f0>
|
||||
@@ -284,8 +285,7 @@ mark{display:inline}
|
||||
<Element {http://www.w3.org/2005/Atom}link at e2b4b0>
|
||||
<Element {http://www.w3.org/2005/Atom}entry at e2b720>
|
||||
<Element {http://www.w3.org/2005/Atom}entry at e2b510>
|
||||
<Element {http://www.w3.org/2005/Atom}entry at e2b750>
|
||||
</pre>
|
||||
<Element {http://www.w3.org/2005/Atom}entry at e2b750></samp></pre>
|
||||
|
||||
<h3 id=xml-attributes>Attributes Are Dictonaries</h3>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user