you do something like this... bar.find_first('Foo') to get the first child node of bar whose name is Foo. Also, to get all the children, you can do bar.find('*').each { |child| do something }

mark

On 5/25/06, Yann Klis <[EMAIL PROTECTED]> wrote:
zdennis a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Yann Klis wrote:
>
>> Hi,
>>
>> Just a quick message to let you know that I'm very pleased with the Ruby
>> bindings for libxml2. The performance are far greater than with REXML
>> for example.
>> The API is not always very "nice", but I think you will make a good job
>> improving it.
>>
>
> Can you suggest where you find the API not nice?
>
Typically, loading an XML chunk from a file or from a string may have a
similar API, IMO (funny that this issue has just been raised in another
thread).
And it would be really cool if I could write something like
bar.children['Foo'] to get the first child node of the node "bar" whose
name is "Foo", or, at least, an easy way to iterate through the children
of a particular node.

++

yk
_______________________________________________
libxml-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/libxml-devel



--
Mark Van Holstyn
[EMAIL PROTECTED]
http://lotswholetime.com
_______________________________________________
libxml-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to