-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XML representation omits XML declaration #52
Comments
We left that out by intention! However, I agree with you that this might be handy. So you want the top representer to prepend that to the rendered XML doc? |
I believe that is what I want. I have not been using roar long enough to completely understand its internals yet, so I would hate to request the wrong thing. This may actually belong in representable. Seems that when #to_xml is called on a model extended by a representer, the XML declaration line should be there. I myself cannot think of a use case where you may need to turn that off with an option, but there may be some users who desire this? |
I would also make use of this feature if added. Happy to investigate adding it myself if you can point me in the right direction, but I won't have too much free time over the next week. |
Maybe we should have the following API? representer.to_xml(declaration: true) That would go into |
That looks easy to use, but how would it handle specifying the
|
Up to you, @ShaneWilton! I haven't used XML in ages and will probably never use it, again. I'm actually thinking of introducing |
I'm jealous 😛 Cool, I'll see what I can do about building that. It might be a bit because I'm a little swamped right now. I'll let you know if I have questions about the codebase. |
After searching representable and roar, I can find no option to include the XML declaration line in the representation. Is there a way to accomplish this or is it an oversight?
The text was updated successfully, but these errors were encountered: