|
[
Permlink
| « Hide
]
Niall Pemberton added a comment - 23/Nov/06 03:30 AM
I just had a look at the Digester javadoc but I don't see a parse() method that takes a URL - just a String uri. I guess I must be missing something, can you point me in the right direction?
> I just had a look at the Digester javadoc but I don't see a parse() method
> that takes a URL - just a String uri. I guess I must be missing something, > can you point me in the right direction? Grumble ... you're right, of course. I thought this had been taken care of earlier in Digester. I'll file an issue against Digester and make this one dependent on it. I suspect it won't be able to get in to Digester 1.8, but there's always 1.9 ...
Craig McClanahan made changes - 23/Nov/06 04:04 AM
OK, probably the easiest solution (rather than co-ordinating component releases) is to create an org.xml.sax.InputSource as Digester does and call the parse() method with that.
Patch attached
Niall Pemberton made changes - 23/Nov/06 04:09 AM
The patch looks OK to me, but with one comment ... it makes me uncomfortable to have code that opens a stream without explicitly closing it. Even though it apparently works in the case of a resource embedded in a JAR file (such as the registered DTDs inside Digester), I'd feel better if we did the close ourselves ... so the constructor that takes a URL might be coded like this:
Digester digester = initDigester(); instead. I'm going to make the same recommendation to Simon on the uses of this pattern inside Digester, too (although that could get a little painful in some cases). Can you tell I've been getting bit by locked Commons JAR files on Windows a lot lately?
Niall Pemberton made changes - 23/Nov/06 05:46 AM
Henri Yandell made changes - 12/Nov/07 07:25 PM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||