[jdom-interest] Processing instruction map issues
Jason Hunter
jhunter at servlets.com
Mon May 5 13:01:17 PDT 2003
Elliotte Rusty Harold wrote:
>
> Although I wouldn't suggest this for the JDOM internal code, I do
> note that for client code parsing pseudo-attributes has gotten a
> *lot* easier in 1.4 than it used to be because Java now has regular
> expressions. Inb fact, I wouldn't be incredibly surprised if a good
> regular expression were more robust than the code that's in there now.
I've looked into finding regular expressions for similar features
(parsing command lines and taking quotes into account), and the
expressions basically work by full enumeration of the various quote
options -- much like what the Java code we have does. You could rewrite
it with a regex, but I don't see why. I think the Java code we have
works in 100% of cases (I did a lot of testing on it) and works on older
JDKs.
-jh-
More information about the jdom-interest
mailing list