hi,
I want to find the unscaped characters in some XML input in order to replace them with their escape sequences through my code.
For instance, my XML input would consist unescaped and escaped & characters in it. What i want to achieve is that find only all the unescaped & characters and replace them with '&' i.e. their escape character.
I have thought of using pattern matching in Java to solve this problem and have ofund out the pattern &[a-z]+; would help find all the escape sequences in the XML input.
however, i am not able to create a pattern for finding the unescaped & characters in the XML input.
please advise.
regads,
Diptee


LinkBack URL
About LinkBacks
Reply With Quote

by clicking the
button on their useful posts.
.
, but thought it might lead you in the right direction. Basically, I thought your question was that you wanted to replace all '&' with '&', but leave the other '&espacetext;' type of escaped values alone. Just doing a replace on the & obviously won't work. The regular expression I posted was along the lines of trying to look for amps that are not followed by the typical & escaped pattern. If it doesn't make much sense, I suggest looking through