Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am trying to parse XML that is generated by a third party. Ampersands that aren't escaped break XPath Parser for example:
<Classification ValueID="6215">I.T. & Communications</Classification>
Causes a failure with the message:
xmlParseEntityRef: no name on line 14. Error code: 68
I know that an unescaped ampersand isn't valid XML and that this isn't great, however I cannot control the feed I recieve. Has anybody else experienced this problem? Has anyone tried to patch the module to make it tolerate imperfect XML?
Comments
Comment #1
paultrotter50 CreditAttribution: paultrotter50 commentedComment #2
paultrotter50 CreditAttribution: paultrotter50 commentedComment #3
paultrotter50 CreditAttribution: paultrotter50 commentedActually the feed doesn't have the problem - it was just looking at the XML through a browser that showed the unescaped character. Marking as Closed.