Description
After upgrading from fast-xml-parser@5.5.8 to 5.7.1, the parser rejects valid XML numeric character references such as 
 (carriage return).
Error Message
Error: [EntityReplacer] Invalid character '#' in entity name: "#xD"
Reproduction
This occurs when parsing XML responses from AWS S3 (via @aws-sdk/xml-builder which uses fast-xml-parser). AWS S3 responses contain XML with standard numeric character references like 
.
Expected Behavior

 is a valid XML numeric character reference representing carriage return (U+000D). According to the XML specification, numeric character references in the form &#xNNNN; (hexadecimal) or &#NNNN; (decimal) should be accepted.
Reference: https://www.w3.org/TR/xml/#NT-CharRef
Root Cause Hypothesis
The issue appears to be related to the dependency change in v5.7.x from fast-xml-builder to @nodable/entities. The new entity handling seems to incorrectly treat #xD as an entity name rather than recognizing it as a numeric character reference.
Environment
- fast-xml-parser version: 5.7.1
- Node.js version: 24.x
- Downstream dependency: @aws-sdk/xml-builder (AWS SDK v3)
Workaround
Pinning to fast-xml-parser@5.5.8 resolves the issue.
Description
After upgrading from
fast-xml-parser@5.5.8to5.7.1, the parser rejects valid XML numeric character references such as
(carriage return).Error Message
Reproduction
This occurs when parsing XML responses from AWS S3 (via
@aws-sdk/xml-builderwhich usesfast-xml-parser). AWS S3 responses contain XML with standard numeric character references like
.Expected Behavior

is a valid XML numeric character reference representing carriage return (U+000D). According to the XML specification, numeric character references in the form&#xNNNN;(hexadecimal) or&#NNNN;(decimal) should be accepted.Reference: https://www.w3.org/TR/xml/#NT-CharRef
Root Cause Hypothesis
The issue appears to be related to the dependency change in v5.7.x from
fast-xml-builderto@nodable/entities. The new entity handling seems to incorrectly treat#xDas an entity name rather than recognizing it as a numeric character reference.Environment
Workaround
Pinning to
fast-xml-parser@5.5.8resolves the issue.