Yes, I'm hoping that this is relatively temporary. I'm doing this for now so we can get a couple of custom parser/writer implementations written up, then we can see what makes the most sense. In other words, consider this to be a work in progress.
- James Garrett Rooney wrote: > On 6/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> Author: jmsnell >> Date: Wed Jun 28 10:51:56 2006 >> New Revision: 417828 >> >> URL: http://svn.apache.org/viewvc?rev=417828&view=rev >> Log: >> Adding custom parser/writer support >> >> This introduces the concept of named parsers and named writers. For >> instance, if I wanted to have >> a JSON serialization of a set of Abdera objects, I could do something >> like: >> >> Writer writer = WriterFactory.INSTANCE.getInstance("json"); > > Maybe it's just me, but .INSTANCE.getInstance() seems kind of weird. > We have to get an instance of our factor, and use that to get an > instance of a writer? Is it just me, or is maybe this stuff getting a > bit too overly abstract? > > Also... > >> @@ -93,5 +93,31 @@ >> ParserOptions options) >> throws ParseException, URISyntaxException; >> >> + <T extends Element>Document<T> parse( >> + Object in) >> + throws ParseException; >> + >> + <T extends Element>Document<T> parse( >> + Object in, >> + URI base) >> + throws ParseException; >> + >> + <T extends Element>Document<T> parse( >> + Object in, >> + URI base, >> + ParserOptions options) >> + throws ParseException; >> + >> + <T extends Element>Document<T> parse( >> + Object in, >> + String base) >> + throws ParseException, URISyntaxException; >> + >> + <T extends Element>Document<T> parse( >> + Object in, >> + String base, >> + ParserOptions options) >> + throws ParseException, URISyntaxException; >> + >> ParserOptions getDefaultParserOptions(); >> } > > I'm not overly thrilled with the idea of adding parse(Object foo) > methods... Doesn't that basically kill any benefit from static typing > we once had here? Compile time errors are now run time errors... > > -garrett >
