[antlr-interest] XML parsing

Matt Benson gudnabrsam at yahoo.com
Tue Jun 10 08:25:39 PDT 2003


So according to the xml pull suggestion, you would set
up your rules in a similar manner to how Antlr parsers
are built, with rule methods calling subrule methods,
passing along an XmlPullParser from which each rule or
subrule method can pull content?

Thanks,
Matt


--- Andrew Deren <andrew at adersoftware.com> wrote:
> Antlr might be a good approach, but I think SAX or
> XML Pull
> (http://www.xmlpull.org/) might be better solution.
> They have lower
> overhead, and are specifically designed for handling
> large xml documents.
> As for repetitions and parent relations, I would use
> Stack (or if you're
> using xml pull, method calls) to keep track of where
> you are.
> Andrew
> 
> -----Original Message-----
> From: Matt Benson [mailto:gudnabrsam at yahoo.com] 
> Sent: Tuesday, June 10, 2003 9:09 AM
> To: Antlr List
> 
> 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/ 
> 
> 
> 
> 
>  
> 
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/ 
> 
> 


__________________________________
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