You are here: Home > Dive Into Python > HTML Processing > Summary | << >> | ||||
Dive Into PythonPython from novice to pro |
Python provides you with a powerful tool, sgmllib.py, to manipulate HTML by turning its structure into an object model. You can use this tool in many different ways.
- parsing the HTML looking for something specific
- aggregating the results, like the URL lister
- altering the structure along the way, like the attribute quoter
- transforming the HTML into something else by manipulating the text while leaving the tags alone, like the Dialectizer
Along with these examples, you should be comfortable doing all of the following things:
- Using locals() and globals() to access namespaces
- Formatting strings using dictionary-based substitutions
<< Putting it all together |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | |
XML Processing >> |