On Fri, 28 Apr 2006 09:30:44 +0100, Rik Hemsley <[EMAIL PROTECTED]> wrote:
Hi, I have a couple of small questions: I have XML like this: <a><b/></a> I would like to add a node before <b/>, i.e.: <a><c/><b/></a> With the C library of libxml2, I could use xmlAddPrevSibling() Is there an equivalent for ruby-libxml?
Currently, I think we only have support for adding a sibling after all existing siblings. I'm proposing the attached patch to add support for both prev= and next= on XML::Node.
I would also like to know how it is possible to add a Dtd to a Document. There seems to be no dtd= or equivalent.
I'm afraid we still have some work to do in this area. I don't know of a way to achieve this at present.
Cheers, -- Ross Bamford - [EMAIL PROTECTED]
set_next_prev.patch
Description: Binary data
_______________________________________________ libxml-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/libxml-devel
