scriptotek / php-marc

Simple interface for working with MARC records using the File_MARC package
MIT License
51 stars 11 forks source link

Feature request: Construct records from SimpleXMLElement objects #12

Closed rudolfbyker closed 4 years ago

rudolfbyker commented 5 years ago

I would like to use php-marc alongside this: https://github.com/caseyamcl/phpoaipmh That package returns an iterator which produces SimpleXMLElements. 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.

danmichaelo commented 5 years ago

This is a limitation in File_MARC. I submitted a pull request that fixes it, but it has not yet been merged:

https://github.com/pear/File_MARC/pull/11

rudolfbyker commented 5 years ago

Very nice! I'll wait patiently...

On Tue, 6 Nov 2018 at 19:18, Dan Michael O. Heggø notifications@github.com wrote:

This is a limitation in File_MARC. I submitted a pull request that fixes it, but it has not yet been merged:

pear/File_MARC#11 https://github.com/pear/File_MARC/pull/11

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/scriptotek/php-marc/issues/12#issuecomment-436334637, or mute the thread https://github.com/notifications/unsubscribe-auth/AJj5fktjvRPOfo6NaTAlQuNXuKSys1pyks5uscR4gaJpZM4YP49g .

danmichaelo commented 5 years ago

Decided to prepare a smaller PR which should be easier to review for the maintainer: https://github.com/pear/File_MARC/pull/14 , feel free to thumbs up it!

rudolfbyker commented 4 years ago

I see your PR has been accepted https://github.com/pear/File_MARC/pull/14 Well done, and thanks! Please let me know if there is something I can do to help with this issue.

danmichaelo commented 4 years ago

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.

rudolfbyker commented 4 years ago

Note to future self: File_MARC 1.4.1 has been released.

danmichaelo commented 4 years ago

Fixed in #19