salesking / sepa_king

Ruby gem for creating SEPA XML files
MIT License
149 stars 118 forks source link

Parsing/storing documents #75

Closed grncdr closed 4 years ago

grncdr commented 6 years ago

Hi, thanks for the library, it's been a huge help!

Is there a recommended way to de-serialize the documents created by e.g. Sepa::CreditTransfer.new(...).to_xml? I'm currently storing a log of all the XML docs we submit, and getting data out of them later means a lot of Xpath. It would be great if there was some sort of from_xml method that would give me an object equivalent to the one I called to_xml on.

Use cases for me include test assertions and displaying useful details about what bank transactions we've initiated with a given document.

MrTin commented 4 years ago

Wouldn't it be better to just store the input in a format you prefer alongside storing the generated output instead of trying to use the XML as a serializer?

grncdr commented 4 years ago

Hey, sorry I don't really remember what I was trying to accomplish when I opened this issue, but clearly it hasn't been a show-stopper. I think it's fine to close it.