Will something "break" if I use numeric entities instead of the usual recommended alpha entities for reserved chars in XML?
This is part of a rather complex app that allows users to enter bibliographic metadata via XML, CSV or web-based forms. This data can then be extracted in XML (using the ONIX standard) with user-chosen encodings: utf-8, win-1252, etc.
The original programmers (long gone now...) decided to use numeric entities for all chars that cannot be represented in the chosen encoding. XML-reserved chars are considered as non-representable under any encoding. They are given the same treatment and are encoded using numeric entities.
Some users have complained about &, <, >, etc. being encoded as &, etc. instead of using the usual alpha codes and I'd like to know if these complaints have any substance.
If I can avoid digging through the legacy code to change this behaviour, it would save me a lot of resources.
Yes, it's fine to escape using numeric character references.
From the spec (emphasis mine):
You could also use a hex entity reference...
&
=&
=&
<
=<
=<
>
=>
=>