|
Writing SAX Filters
by Anghel Leonard
Pretty much everybody knows that a filter is kind of like a backup vocalistit helps the main singer to become a star. SAX filters are used in XML document processing and can help amp up your SAX parsing. To extend the previous metaphor, the SAX filter is the backup singer for the SAX parser. XML Documents are the song. You can write SAX filters to:
- Modify an XML document while it is parsed.
- Validate the information stored in an XML doc and verify if it corresponds to application demands
- Monitor the serialization of an XML doc
- Control the parsing process
in this article, you'll learn how to create a SAX filter from scratch using the XMLFilter and XMLFilterImpl classes. You'll also learn how to modify and validate an XML document using two different filters. In the end, you'll put these two filters in a filters chain. The presented applications can function as a starting point for your understanding of a SAX filters' inner workings. All you have to do is to read carefully, and of course, to be familiar with SAX parsing facility.
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
|