[jdom-interest] question (help)

Michael Engelhart mengelhart at earthtrip.com
Fri Sep 8 10:43:52 PDT 2000


Hi,

Yesterday I posted about a problem I'm having with the  
getAttributeValue(String name) method in the Element class which I didn't  
get a response to so I'm reposting since my question may not have been very  
clear.  Here goes:
If I have an attribute value which is an "escaped" string, the escape  
slash is removed upon retrieval.  Can anyone tell me if this is a bug or  
expected behavior?  If it's expected, please tell me why that happens so I  
can try and come up with a workaround.  The reason (in case anyone is  
questioning) that I have escaped strings is that i'm keeping a bunch of  
regular expressions stored in an xml document for retrieval and am using  
the ORO (now Apache) Perl utilities matching classes which require escaped  
strings in their patterns like this:
m/MAX\\s+([0-9]+)/s

which the getAttributeValue() mangles into:
m/MAX\s+([0-9]+)/s

not the single slash after "MAX" in the returned string.   I can't figure  
out why this would be the correct behavior but maybe it is.

Thanks for any insight

Mike



More information about the jdom-interest mailing list