Hi David,

you were right! I used Felipe's code and applied it to the serialization of the results in Solr.php:

        // Serialize our results from PHP arrays to XML
        if ($serializer->serialize($result)) {
            $xmlResults = $serializer->getSerializedData();
            $xmlResults = preg_replace ('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', ' ', $xmlResults); // Felipe's pregreplace

Now it works! Thanks!

Beste Grüße,


Am 07.01.2013 10:00, schrieb David Maus:
At Mon, 07 Jan 2013 09:38:00 +0100,
Christian Dabrowski wrote:
Hi all,

I encounter a rss-feed error - I checked the two recent list-topics on the rss module but it seems, the error I receive here is different: it appears when clicking the "get rss-feed"-button while being on the result list. I receive the
following message (Firefox):

XML parsing error: syntax error
at line 2 at column 1:

Warning: DOMDocument::loadXML(): PCDATA invalid Char value 28 in Entity, line: 396 in /usr/local/vufind/web/sys/SearchObject/Solr.php on line 1513

The strange thing is that I never customized the Solr.php. Thus, in
the search-folder I checked all the files that were customized for
non UTF8 charakters, but it didnt't help.  I also removed all
non-breaking spaces that I've inserted from the footer and the
header; also without any success.
Maybe the error is in the data, not the code? ASCII 28 is

|     preferred charset: ascii (ASCII (ISO646 IRV))
| code point in charset: 0x1C
|                syntax: . 	which means: punctuation
|           buffer code: #x1C
|             file code: #x1C (encoded by coding system utf-8-unix)
| Character code properties: customize what to show
|   name: <control>
|   general-category: Cc (Other, Control)
|   decomposition: (28) ('')

A SOLR response document that contains fields with this character is
not a valid XML document due to the XML specs.

One way to suppress this problem is to tidy-up the document
manually. Filipe provided a regular expression in a somewhat related


| preg_replace ('/[^\x{0009}\x{000a}\x{000d}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}]+/u', ' ', $xml);

You should apply this regexp before/after/instead the cleaning up for
the MARC error fields.

  -- David
David Maus
Herzog August Bibliothek - D-38299 Wolfenbuettel
Phone: +49-5331-808-317
Email: maus@hab.de

Digital Humanities Research Collaboration

PGP Key 0x0CC2E093512F7385
Fingerprint 1AD2 EE67 224F 18C5 EA55  98AD 0CC2 E093 512F 7385