SAX: continue parsing in included file(s)  
Author Message
John Bokma





PostPosted: 2006-10-13 3:11:00 Top

java-programmer, SAX: continue parsing in included file(s) Currently I use <include>foo.xml</include> [1] in order to include foo.xml
into bar.xml (for example). Since I am moving the parsing to Java, using
SAX I was wondering what the best way is to implement this feature. How do
I "redirect" the reading to another file via a handler?

IIRC, another option might be to use &foo; [2] and include the file that
way, possible combined with a SAX filter to translate <include>foo.xml
</include> into &foo; ?

Any suggestions?

[1] I used in the past a parser (not with Java) that as far as I know was
not able to handle this:

[2] <!ENTITY foo SYSTEM "foo.xml"> , see
http://xml.silmaril.ie/authors/includes/

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html