6Tutorial
Creating a Universal XHTML Parser
A Simple XML—Text Parser
Our final goal of this chapter is to create a parser for XHTML pages. The parser will recognize the title tag and the style sheet link tag and apply the style sheet and the body tag to set a background color. Of course, the parser will be able to display the text and images from the content within the body tag. However, since this is the first tutorial in which we apply XML methods, we will start with a simpler parser, which will recognize the title tag and set the background color with a defined style sheet. The final parser script will be a few lines longer and will be able to recognize the style sheet link and apply the style sheet to the text. This will allow the application ...
Get Flash XML Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.