-
Notifications
You must be signed in to change notification settings - Fork 176
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
xmlns in root node #39
Comments
According to the README ROXML does not support outputting namespaced nodes. Apparently this is planned for a future version. I've needed the same functionality myself and I've had to override |
Mmmh, thx for the clarification. I consulte the README, but may have overseen that... |
@ruckus We're running into the same issue over here. Could you detail what you did to override to_xml to build the XML with namespaces? Perhaps point us to some code? We've got some time to work on this, if we feel like this would be a beneficial contribution for the project. |
@benWoz my approach ended up being fairly manual. Check out this stuff: https://github.com/ruckus/quickeebooks/blob/master/lib/quickeebooks.rb#L27 That https://github.com/ruckus/quickeebooks/blob/master/lib/quickeebooks/model/account.rb When I have an instance of This works but feels kinda janky. In the base Hope this helps |
@ruckus, thanks for the quick response. I'll take a look at it and see what can be done! |
Any further forward with this? I'm trying to output the following, e.g.
Right now, I'm doing the following nasty hack:
|
I think we ended up taking a different route. Can't remember exactly what & Wish I had more info for you.
On Tue, Jun 19, 2012 at 11:07 AM, Stuart Gale <
|
That's cool don't worry. My nasty hack works for now... :) |
A nicer alternative to @bishboria's hack is this... class Example
include ROXML
xml_reader :xmlns, :from => :attr
def initialize
@xmlns = "http://example.com"
end
end |
For other folks that run into this - the easiest way I found (outside of forking + patching) is to override
|
Hi there,
how do I have to use roxml to get
as parameter in root node when using
I tried to figure out how to do it by myself, but I didn't find a way to do it (I had a look at spec/namespaces).
I used the following input file (btw: this is how the output should look like)
and the following script
Help would be very welcome, as I'm stuck in the moment and need the stuff working for my master thesis.
Thanks.
Cheers,
Max meyer
The text was updated successfully, but these errors were encountered: