Rails XML samples

I am looking for examples of Rails sites that deliver and consume xml,
specifically with nested resources; for example, an invoice header and
related invoice details. I would like examples that expose both the
model and controller code so that I can see how this is wired up.

I am preparing a transfer of legacy data to a new rails app and I am
contemplating using the existing system's report generator to produce an
xml document with the necessary attributes arranged and tagged for the
new data structure. However, I need to see how this works in practice.

If anyone has recommendations I would greatly appreciate viewing them.