Is this valid XML data (the value of the messageContent in particular)?
I am getting it from an API.
I then get an error when I pass this XML down to a Postgres function for saving to the Postgres DB.
<rows>
<row messageDateUTC="2020-06-01T21:20:37.120"
texterAddress="" texterStreet="" messageContent="Hey beautiful it's Scott!��" />
</rows>
I wonder if it's an API issue, or a problem with the client-side module which generates the XML, or maybe Postgres has an issue and is not able to handle these characters.
Error here:
Caused by: org.postgresql.util.PSQLException: ERROR: invalid XML content
Detail: line 5: xmlParseCharRef: invalid xmlChar value 55357
ddress="" texterStreet="" messageContent="Hey beautiful it's Scott!�
^
line 5: xmlParseCharRef: invalid xmlChar value 56842
" texterStreet="" messageContent="Hey beautiful it's Scott!��
^
line 23: chunk is not well balanced