To XML and Beyond: Converting Other Grammars into XML
To process structured text that has an unusual format, we must write a parser for its grammar. This is what we did in the previous section, when we wrote a grammar specification in JavaCC for an arbitrary file format. Working with a non-XML grammar is much more difficult than processing XML, and being able to convert the data to an XML format is useful because the data can then be processed by one of the many XML parsers available. Once you've tested a grammar that you've written, you can expand ...
Get Wicked Cool Java 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.