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 feed an XML page:
<?xml version="1.0" encoding="utf-8"?><div id="c1527" class="csc-default" class="csc-default"><div class="tx-pure-pi">
<div class="pure-result-page" id="p1527:1" ><div class="pure-result"><items xmlns="http://www.w3.org/1999/xhtml">
<item>
<guid>fbfc8780-4a2b-494c-bfbd-824f10122b00</guid>
<title>Interesting publication</title>
<persons>
<author>John Doe</author>
</persons>
<abstract>This is the abstract</abstract>
</item>
However, when I try to insert the XML feed, I get an error message:
Exception: There was an error parsing the XML document. in FeedsXPathParserXML->setup() (line 33 of /var/www/sites/all/modules/feeds_xpathparser/FeedsXPathParserXML.inc).
Could this be caused by the XML format? I do not have direct influence on the format of the XML page.
Regards,
Nyborg
Comments
Comment #1
Nyborg CreditAttribution: Nyborg commentedComment #2
STNyborg CreditAttribution: STNyborg commentedSeems as if the error is caused by NAMESPACING. Could this really be true?
If I have the following code:
... then everything is fine. However, if I simply add
<div xmlns="http://www.w3.org/1999/xhtml">
then no results are imported.Suggestions as how to solve this are most welcome...
Regards,
Nyborg