How to efficiently replace characters in XML document in Java?

Posted by Pregzt on Stack Overflow See other posts from Stack Overflow or by Pregzt
Published on 2010-05-19T12:56:12Z Indexed on 2010/05/19 13:00 UTC
Read the original article Hit count: 285

Filed under:
|
|
|

I'm looking for a neat and efficient way to replace characters in XML document. There is a replacement table defined for almost 12.000 UTF-8 characters, most of them are to be replaced by single characters, but some must be replaced by two or even three characters (e.g. Greek theta should become TH). The documents can be bulky (100MB+). How to do it in Java? I came up with the idea of using XSLT, but I'm not too sure if this is the best option.

© Stack Overflow or respective owner

Related posts about java

Related posts about Xml