Closed irgaly closed 2 years ago
<string name="empty"></string>
will be
<string name="empty"/>
attributes
before | after |
---|---|
&#{unicode}; |
{unicode decoded string} |

 |
|

 |
|
> |
> |
< |
< |
> |
> |
& |
& |
' |
' |
content
before | after |
---|---|
> |
> |
> |
> |
&#{unicode}; |
{unicode decoded string} |

 |
|
< |
< |
& |
& |
' |
' |
The only way to preserve original text in javax.xml is using StAX Parser.
ref: https://stackoverflow.com/a/14748821/13403244 https://www.bold.ne.jp/engineer-club/java-xml-read#-XMLStreamReader
StAX parser's IS_REPLACING_ENTITY_REFERENCES can not prevents special characters replacement...
I'll fix this problem with StAX parser and event location + original text location.
release in v1.1.0
example:
will be xml escaped