Skip to content

XML parse errors parsing metadata payload #35

@sdm7g

Description

@sdm7g

I'm using oaipmh via oai-harvest.
When the program hits an exception from a parse error in the metadata payload, it quits and stops harvesting. ( Typically not a problem with simple oai_dc metadata, but oai_ead has a lot more to get correct, and I'm seeing this frequently on several ArchivesSpace OAI feeds. )
I have found that back patching the Client.parse method to create an XMLParser with recover=True manages to finish harvesting the entire feed.
etree.XML(xml, etree.XMLParser(recover=True))

You might consider adding that as an option on creating Client, or as a subclass.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions