Feature request: Construct records from SimpleXMLElement objects
rudolfbyker opened this issue · 7 comments
I would like to use php-marc
alongside this: https://github.com/caseyamcl/phpoaipmh That package returns an iterator which produces SimpleXMLElement
s. I'd like to do this:
Record::fromSimpleXMLElement($obj);
... instead of this:
Record::fromString($xml_record->asXML());
... since the extra conversions to and fro between XML string and XML object is unnecessary.
This is a limitation in File_MARC. I submitted a pull request that fixes it, but it has not yet been merged:
Decided to prepare a smaller PR which should be easier to review for the maintainer: pear/File_MARC#14 , feel free to thumbs up it!
I see your PR has been accepted pear/File_MARC#14 Well done, and thanks! Please let me know if there is something I can do to help with this issue.
Indeed, yes, only problem is that there hasn't been a new release of File_MARC yet. I haven't asked for it yet, so feel free to do so.
Note to future self: File_MARC 1.4.1 has been released.
Fixed in #19