hi all,
i use the following code to pre process a xml file to make it "more" xml
conform:
FileInputStream f = new FileInputStream(fileName);
InputStreamReader isr = new InputStreamReader(f);
RE re = new gnu.regexp.RE("<(br|b|i|tt|BR|B|I|TT)>");
REFilterReader fr = new REFilterReader(isr, re, "<$1>");
RE re2 = new gnu.regexp.RE("</(br|b|i|tt|BR|B|I|TT)>");
REFilterReader fr2 = new REFilterReader(fr, re2, "</$1>");
I would also like to encode special characters like i would do it with
perl:
$content =~ s/([\176-\377])/ '&#' . ord($1) . ';'/esg;
Is it possible with the java gnu regexp package to call a function with
the match?
I tried to write a sub class of the REFilterReader which does something
but the members like match are not visible to public...
Best Regards,
Mark