[antlr-interest] Re: XML parsing

Oliver Zeigermann oliver at zeigermann.de
Wed Jun 11 05:27:31 PDT 2003


I have implemented a framework of what you describe:

http://www.zeigermann.de/xpa/index.html

It allows you to feed XML SAX events into ANTLR parsers as token 
streams. Optionally, if you do not care for space, you can create an 
AST from a SAX parser and transform it using ANTLR tree parsers.

Oliver

--- In antlr-interest at yahoogroups.com, Matt Benson <gudnabrsam at y...> 
wrote:
> I am involved with a project of which one of the most
> daunting components is to take a large XML document
> and insert its contents in a relational database.  The
> structure of the document allows for repetitions of
> many of its elements, and may include the same types
> of elements with different meanings based on context. 
> I was trying to decide whether something like XSLT
> might help with this problem, when I was struck by the
> idea that a recursive-descent parser might be the
> thing to use.  This way we could specify structure by
> use of rules, and Antlr's use of parameters and return
> values could allow us to specify a contextual
> interpretation to an element, and receive a value by
> which to associate it with a parent relational
> database record.  Does this sound like a good
> approach?  Can anyone offer a better alternative?
> 
> TIA,
> Matt
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
> http://calendar.yahoo.com


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list