04.08.2014 Views

o_18ufhmfmq19t513t3lgmn5l1qa8a.pdf

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 22 ■ PROJECT 3: XML FOR ALL OCCASIONS 437<br />

Further Exploration<br />

Now you’ve got the basic program. What can you do with it? Here are some suggestions:<br />

• Create a new ContentHandler for creating a table of contents or a menu (with links) for<br />

the Web site.<br />

• Add navigational aids to the Web pages that tell the user where (in which directory) he or<br />

she is.<br />

• Create a subclass of WebsiteConstructor that overrides writeHeader and writeFooter to<br />

provide customized design.<br />

• Create another ContentHandler that constructs a single Web page from the XML file.<br />

• Create a ContentHandler that summarizes your Web site somehow, for example in RSS<br />

(see Chapter 15).<br />

• Check out other tools for transforming XML, especially XSLT (see http://www.w3.org/<br />

TR/xslt and http://www.4suite.org).<br />

• Create one or more PDF documents based on the XML file, using a tool such as<br />

ReportLab’s Platypus (http://reportlab.org).<br />

• Make it possible to edit the XML file through a Web interface (see Chapter 25).<br />

What Now?<br />

After this foray into the world of XML parsing, let’s do some more network programming. In the<br />

next chapter, you create a program that can gather news items from various network sources<br />

(such as Web pages and Usenet groups) and generate custom news reports for you.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!