Forum: Ruby libxml problems

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3bef3fc4d0cbcf58f3d66c106e2fd16f?d=identicon&s=25 Mark Van Holstyn (Guest)
on 2006-03-05 22:47
(Received via mailing list)
We are looking at changing from using rexml in one project to libxml, as
it
proves to be much faster. However, the ruby libxml binding seems to be
missing the capability to remove elements from an XML document (or at
least
I cannot see how to do so). Also, when trying to set attributes on a
node
(properties as libxml calls them), the attributes duplicate.

If i have a node like so:
<node name="something"/>

then in ruby i do (n is the node):
n['name'] = 'something else'

Now the node looks like:
<node name="something" name="something else"/>

Anyone know what I am missing?

Thanks in advance,

Mark
A9b6a93b860020caf9d2d1d58c32478f?d=identicon&s=25 Ross Bamford (Guest)
on 2006-03-06 12:35
(Received via mailing list)
On Mon, 2006-03-06 at 06:46 +0900, Mark Van Holstyn wrote:
> If i have a node like so:
> <node name="something"/>
>
> then in ruby i do (n is the node):
> n['name'] = 'something else'
>
> Now the node looks like:
> <node name="something" name="something else"/>

Hmm, this could be a bug... I'd appreciate if you could report it on the
libxml list (libxml-devel@rubyforge.org) so we can look into it and work
up a patch...

Thanks,
This topic is locked and can not be replied to.