SimpleXmlResponseProcessor

Implements \VuFindHarvest\ResponseProcessor\ResponseProcessorInterface

Class for processing API responses into SimpleXML objects.

category

VuFind

package

Harvest_Tools

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Wiki

Methods

Constructor

__construct(string $basePath, array $settings = array()) 

Arguments

$basePath

string

Base path to harvest directory.

$settings

array

OAI-PMH settings from oai.ini.

Collect LibXML errors into a single string.

collectXmlErrors() : string

Response

string

Log a bad XML response.

logBadXML(string $xml) : void

Arguments

$xml

string

Bad XML

Process an OAI-PMH response into a SimpleXML object. Throw an exception if an error is detected.

process(string $xml) : mixed
Throws
\Exception

Arguments

$xml

string

Raw XML to process

Response

mixed

Sanitize XML.

sanitizeXml(string $xml) : string

Arguments

$xml

string

XML to sanitize

Response

string

Properties

Should we sanitize XML?

sanitize : boolean
var

Type(s)

boolean

Filename for logging bad XML responses (false for none)

badXmlLog : string|boolean
var

Type(s)

string|boolean

An array of regex strings used to sanitize XML

sanitizeRegex : array
var

Type(s)

array