[ANN] LibXML-Ruby 0.3.6

Discussion in 'Ruby' started by Ross Bamford, Feb 23, 2006.

  1. Ross Bamford

    Ross Bamford Guest

    LibXML-Ruby 0.3.6 is now available from Rubyforge. LibXML-Ruby is (as
    you may have guessed) a C-language Ruby binding to the Gnome LibXML2
    library, supporting a wide range of XML technologies and offering very
    competitive performance across the board.

    You can obtain LibXML-Ruby via Rubygems:

    gem install libxml-ruby

    Or as standard tarball/zip packages:

    http://rubyforge.org/frs/?group_id=494&release_id=4388

    This release is essentially our 'ground zero' release after a recent
    effort to revive the sleeping LibXML-Ruby project with the help of
    original author Sean Chittenden. Although fixes for a number of bugs in
    the build and the code are included, no new functionality has yet been
    added. We are keen to gain feedback from the community, whether positive
    or negative, with a view to fixing the direction of the project. Our
    mailing list:



    You can find (a bit) more information, and API documentation, at the
    project website on Rubyforge:

    http://libxml.rubyforge.org/

    (Please note, *not* xml-tools as was previously the case).

    For more information on the XML technologies supported by LibXML2, or
    for help obtaining or installing it, please see:

    http://xmlsoft.org/

    --
    Ross Bamford -
    Ross Bamford, Feb 23, 2006
    #1
    1. Advertising

  2. Ross Bamford

    Mr. Big Guest

    Re: LibXML-Ruby 0.3.6

    Will this library be renamed LibXML2-Ruby soon? The current name is
    slightly misleading.

    --
    Posted via http://www.ruby-forum.com/.
    Mr. Big, Feb 23, 2006
    #2
    1. Advertising

  3. Ross Bamford

    Ross Bamford Guest

    Re: LibXML-Ruby 0.3.6

    On Fri, 2006-02-24 at 04:48 +0900, Mr. Big wrote:
    > Will this library be renamed LibXML2-Ruby soon? The current name is
    > slightly misleading.
    >


    Yes, I have to agree. But the project was previously under the name
    'libxml-ruby' and we wanted to get a release out quickly, with minimal
    changes (beyond fixing things). This release should be completely
    compatible with existing code, including the "require 'xml/libxml'"
    part.

    We're hoping to get feedback from this release and work that into the
    next minor release, 0.4.0. Maybe between now and then we can slip a name
    change in there ...

    --
    Ross Bamford -
    Ross Bamford, Feb 23, 2006
    #3
  4. ------=_Part_10092_16295445.1140730107084
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: quoted-printable
    Content-Disposition: inline

    Tried to install it under windows and it failed because I didn't have Zlib.
    This is with the ruby one click installer.

    Thanks

    On 2/23/06, Ross Bamford <> wrote:
    >
    > LibXML-Ruby 0.3.6 is now available from Rubyforge. LibXML-Ruby is (as
    > you may have guessed) a C-language Ruby binding to the Gnome LibXML2
    > library, supporting a wide range of XML technologies and offering very
    > competitive performance across the board.
    >
    > You can obtain LibXML-Ruby via Rubygems:
    >
    > gem install libxml-ruby
    >
    > Or as standard tarball/zip packages:
    >
    > http://rubyforge.org/frs/?group_id=3D494&release_id=3D4388
    >
    > This release is essentially our 'ground zero' release after a recent
    > effort to revive the sleeping LibXML-Ruby project with the help of
    > original author Sean Chittenden. Although fixes for a number of bugs in
    > the build and the code are included, no new functionality has yet been
    > added. We are keen to gain feedback from the community, whether positive
    > or negative, with a view to fixing the direction of the project. Our
    > mailing list:
    >
    >
    >
    > You can find (a bit) more information, and API documentation, at the
    > project website on Rubyforge:
    >
    > http://libxml.rubyforge.org/
    >
    > (Please note, *not* xml-tools as was previously the case).
    >
    > For more information on the XML technologies supported by LibXML2, or
    > for help obtaining or installing it, please see:
    >
    > http://xmlsoft.org/
    >
    > --
    > Ross Bamford -
    >
    >
    >


    ------=_Part_10092_16295445.1140730107084--
    Dominic Sisneros, Feb 23, 2006
    #4
  5. Ross Bamford

    Curt Hibbs Guest

    Strange, because ZLib *is* included in the one-click installer.

    Curt

    On 2/23/06, Dominic Sisneros <> wrote:
    > Tried to install it under windows and it failed because I didn't have Zli=

    b.
    > This is with the ruby one click installer.
    >
    > Thanks
    >
    > On 2/23/06, Ross Bamford <> wrote:
    > >
    > > LibXML-Ruby 0.3.6 is now available from Rubyforge. LibXML-Ruby is (as
    > > you may have guessed) a C-language Ruby binding to the Gnome LibXML2
    > > library, supporting a wide range of XML technologies and offering very
    > > competitive performance across the board.
    > >
    > > You can obtain LibXML-Ruby via Rubygems:
    > >
    > > gem install libxml-ruby
    > >
    > > Or as standard tarball/zip packages:
    > >
    > > http://rubyforge.org/frs/?group_id=3D494&release_id=3D4388
    > >
    > > This release is essentially our 'ground zero' release after a recent
    > > effort to revive the sleeping LibXML-Ruby project with the help of
    > > original author Sean Chittenden. Although fixes for a number of bugs in
    > > the build and the code are included, no new functionality has yet been
    > > added. We are keen to gain feedback from the community, whether positiv=

    e
    > > or negative, with a view to fixing the direction of the project. Our
    > > mailing list:
    > >
    > >
    > >
    > > You can find (a bit) more information, and API documentation, at the
    > > project website on Rubyforge:
    > >
    > > http://libxml.rubyforge.org/
    > >
    > > (Please note, *not* xml-tools as was previously the case).
    > >
    > > For more information on the XML technologies supported by LibXML2, or
    > > for help obtaining or installing it, please see:
    > >
    > > http://xmlsoft.org/
    > >
    > > --
    > > Ross Bamford -
    > >
    > >
    > >

    >
    >
    Curt Hibbs, Feb 24, 2006
    #5
  6. Ross Bamford

    Ross Bamford Guest

    On Fri, 2006-02-24 at 21:00 +0900, Curt Hibbs wrote:
    > On 2/23/06, Dominic Sisneros <> wrote:
    > > Tried to install it under windows and it failed because I didn't have Zlib.
    > > This is with the ruby one click installer.

    > Strange, because ZLib *is* included in the one-click installer.
    >
    > Curt
    >

    --
    Ross Bamford -
    Ross Bamford, Feb 24, 2006
    #6
  7. Ross Bamford

    Ross Bamford Guest

    On Fri, 2006-02-24 at 22:05 +0900, Ross Bamford wrote:
    > On Fri, 2006-02-24 at 21:00 +0900, Curt Hibbs wrote:
    > > On 2/23/06, Dominic Sisneros <> wrote:
    > > > Tried to install it under windows and it failed because I didn't have Zlib.
    > > > This is with the ruby one click installer.

    > > Strange, because ZLib *is* included in the one-click installer.
    > >
    > > Curt
    > >


    (Wrong button, excuse the noise)

    Does it include the zlib.h header ?

    If so, OP could maybe try passing --with-zlib=<path> option to a manual
    install, but I'm not sure yet how it could work with gems...

    --
    Ross Bamford -
    Ross Bamford, Feb 24, 2006
    #7
  8. Ross Bamford

    Curt Hibbs Guest

    On 2/24/06, Ross Bamford <> wrote:
    > On Fri, 2006-02-24 at 22:05 +0900, Ross Bamford wrote:
    > > On Fri, 2006-02-24 at 21:00 +0900, Curt Hibbs wrote:
    > > > On 2/23/06, Dominic Sisneros <> wrote:
    > > > > Tried to install it under windows and it failed because I didn't ha=

    ve Zlib.
    > > > > This is with the ruby one click installer.
    > > > Strange, because ZLib *is* included in the one-click installer.
    > > >
    > > > Curt
    > > >

    >
    > (Wrong button, excuse the noise)
    >
    > Does it include the zlib.h header ?
    >
    > If so, OP could maybe try passing --with-zlib=3D<path> option to a manual
    > install, but I'm not sure yet how it could work with gems...


    No, it just includes the executable. The release notes show the exact
    version, so you could download the source and extract the header.

    Curt
    Curt Hibbs, Feb 24, 2006
    #8
  9. On Thursday 23 February 2006 2:32 pm, Ross Bamford wrote:
    > LibXML-Ruby 0.3.6 is now available from Rubyforge. LibXML-Ruby is (as
    > you may have guessed) a C-language Ruby binding to the Gnome LibXML2
    > library, supporting a wide range of XML technologies and offering
    > very competitive performance across the board.


    Wow, this is a pretty incredible speedup!

    <meaningless:benchmark filled-with-mistakes="true">
    Input doc:
    keith@devel /work/frame/templates/main $ du -h main.chap.mx && wc
    main.chap.mx
    2.2M main.chap.mx
    21063 75272 2287526 main.chap.mx


    LibXML
    keith@devel /work/frame/templates/main $ time ruby -e "require
    'rubygems'; require 'xml/libxml'; d =
    XML::Document.file('main.chap.mx'); d.find('//String').each{|n| puts
    n}" | wc
    2090 9200 99275

    real 0m0.785s
    user 0m0.728s
    sys 0m0.068s


    REXML:
    time ruby -e "require 'rexml/document'; d =
    REXML::Document.new(File.new('main.chap.mx')); REXML::XPath.each(d,
    '//String/'){|n| puts n.text}" | wc
    2090 9200 60422

    real 1m41.021s
    user 1m40.710s
    sys 0m0.308s

    Computer: 2 x PIII 650Mhz, 1GB RAM
    </meaningless:benchmark>

    Nice work, folks.

    Keith
    Keith Fahlgren, Feb 24, 2006
    #9
  10. Ross Bamford

    Guest

    Re: LibXML-Ruby 0.3.6

    Great!

    Could you please explain to us uninitiated the advantages (and
    disadvantages) of this over REXML?
    , Feb 24, 2006
    #10
  11. Re: LibXML-Ruby 0.3.6

    This sounds great. Thanks for producing these bindings. I am really
    glad to see this as it adds a simple interface for validating against
    an xml schema.

    Sadly I'll eventualy need to get this compiled on windows, which I've
    never had much luck with ;)

    .adam
    Adam Sanderson, Feb 24, 2006
    #11
  12. Ross Bamford

    Une bévue Guest

    Ross Bamford <> wrote:

    >
    > You can obtain LibXML-Ruby via Rubygems:
    >
    > gem install libxml-ruby
    >
    > Or as standard tarball/zip packages:
    >
    > http://rubyforge.org/frs/?group_id=494&release_id=4388


    looks really great, thanks for your work.

    i plane to use this binding within a MacOS X application.

    for me, including "libxml-ruby" is easy using stadalonift.rb from
    Jonathan Paisley, but i wonder on how to embed also the gnome libxml2
    correctly bind to ruby...

    do you have some advices for that point ?
    --
    une bévue
    Une bévue, Feb 24, 2006
    #12
  13. Ross Bamford

    Ross Bamford Guest

    Re: LibXML-Ruby 0.3.6

    On Sat, 2006-02-25 at 01:38 +0900, wrote:
    > Great!
    >
    > Could you please explain to us uninitiated the advantages (and
    > disadvantages) of this over REXML?


    I'll try, but I have to admit I've never made serious use of REXML.

    I think the main difference really is that REXML is implemented in Ruby,
    whereas LibXML-Ruby is a C-language binding to a native library (that
    being, somewhat confusingly I must admit, the Gnome LibXML2 library).

    The main upshot of this is speed, and supported functionality - most
    (though not all) operations are faster with LibXML-Ruby than with REXML,
    mainly due to the native implementation, but partly because LibXML2 is
    itself pretty quick too. Thanks to it's place in Gnome, LibXML2 also
    allows us to support a range of XML-related technologies that REXML
    doesn't (as far as I'm aware?), including stable support for namespaces,
    XPointer, XInclude, catalogues, and more. Obviously full support is
    present for XPath, too (as in REXML I think).

    Possibly more important than any of that depending on your usage is
    validation: LibXML2 (and by extension LibXML-Ruby) fully support DTD
    validation, and has some support for XML Schema (not exactly sure on the
    current status of this).

    I won't get into any 'our library is better than your library'
    discussions, because it's not about that - the two are different animals
    that happen to share a hunting ground. The reasons for choosing one or
    the other come down to a combination of your requirements in terms of
    performance, what you need to do with your XML, whether or not you can
    compile LibXML2 and extensions on your target platform, and your
    personal preference in terms of which API you prefer.

    --
    Ross Bamford -
    Ross Bamford, Feb 25, 2006
    #13
  14. Ross Bamford

    Ross Bamford Guest

    Re: LibXML-Ruby 0.3.6

    On Sat, 2006-02-25 at 02:33 +0900, Adam Sanderson wrote:
    > This sounds great. Thanks for producing these bindings. I am really
    > glad to see this as it adds a simple interface for validating against
    > an xml schema.
    >
    > Sadly I'll eventualy need to get this compiled on windows, which I've
    > never had much luck with ;)


    Hopefully if you have the required libraries it will work, but I have to
    admit to not knowing much about compiling stuff on Windows...

    One of the things we're interested in with this release is getting a
    handle on cross-platform issues. There have been long-standing OSX
    issues which are hopefully now fixed, but with limited hardware/software
    for testing it's really important that we get reports of any problems
    from OSX and Windows users.

    --
    Ross Bamford -
    Ross Bamford, Feb 25, 2006
    #14
  15. Ross Bamford

    Ross Bamford Guest

    On Sat, 2006-02-25 at 04:08 +0900, Une b=C3=A9vue wrote:
    > Ross Bamford <> wrote:
    >=20
    > >=20
    > > You can obtain LibXML-Ruby via Rubygems:
    > >=20
    > > gem install libxml-ruby
    > >=20
    > > Or as standard tarball/zip packages:
    > >=20
    > > http://rubyforge.org/frs/?group_id=3D494&release_id=3D4388

    >=20
    > looks really great, thanks for your work.
    >=20
    > i plane to use this binding within a MacOS X application.
    >=20
    > for me, including "libxml-ruby" is easy using stadalonift.rb from
    > Jonathan Paisley, but i wonder on how to embed also the gnome libxml2
    > correctly bind to ruby...
    >=20
    > do you have some advices for that point ?


    I'm afraid I can't be much help there, I've no experience with OSX. I've
    seen standaloneify.rb but it lost me at "Takes a built RubyCocoa app
    bundle (as produced by the Xcode/ProjectBuilder template)..."

    --=20
    Ross Bamford -
    Ross Bamford, Feb 25, 2006
    #15
  16. Ross Bamford

    Une bévue Guest

    Ross Bamford <> wrote:

    >
    > I'm afraid I can't be much help there, I've no experience with OSX. I've
    > seen standaloneify.rb but it lost me at "Takes a built RubyCocoa app
    > bundle (as produced by the Xcode/ProjectBuilder template)..."


    even not general advices ?

    what i think about that :

    make a try apart (in my HOME)

    with a fresh ruby, libxml2 and RubyLibxml.


    what i have to know is the process of binding that's to say how your
    RubyLibxml find ruby and libxml2, probably this is done at the config
    step.

    then, i can catch the right parameters to get that binding into my fresh
    HOME Ruby and Libxml2 ?

    anyway i'll ask on the RubyCocoa-talk list...
    --
    une bévue
    Une bévue, Feb 25, 2006
    #16
  17. Ross Bamford

    Ross Bamford Guest

    On Sat, 2006-02-25 at 17:43 +0900, Une b=C3=A9vue wrote:
    > Ross Bamford <> wrote:
    >=20
    > >=20
    > > I'm afraid I can't be much help there, I've no experience with OSX. I'v=

    e
    > > seen standaloneify.rb but it lost me at "Takes a built RubyCocoa app
    > > bundle (as produced by the Xcode/ProjectBuilder template)..."

    >=20
    > even not general advices ?
    >=20
    > what i think about that :
    >=20
    > make a try apart (in my HOME)
    >=20
    > with a fresh ruby, libxml2 and RubyLibxml.
    >=20
    >=20
    > what i have to know is the process of binding that's to say how your
    > RubyLibxml find ruby and libxml2, probably this is done at the config
    > step.
    >=20


    Yes, it's handled by ext/xml/extconf.rb . The Ruby version you build
    against is determined by the Ruby you run that script with. You can pass
    in the path to libxml in usual extconf style (--with-xml2-dir or
    --with-xml2-lib and --with-xml2-include).

    You'll need to manually run the extconf (rather than relying on the
    Rakefile) to pass in those options and then run make as usual.

    > then, i can catch the right parameters to get that binding into my fresh
    > HOME Ruby and Libxml2 ?
    >=20
    > anyway i'll ask on the RubyCocoa-talk list...



    --=20
    Ross Bamford -
    Ross Bamford, Feb 25, 2006
    #17
  18. Ross Bamford

    Une bévue Guest

    Ross Bamford <> wrote:

    >
    > Yes, it's handled by ext/xml/extconf.rb . The Ruby version you build
    > against is determined by the Ruby you run that script with. You can pass
    > in the path to libxml in usual extconf style (--with-xml2-dir or
    > --with-xml2-lib and --with-xml2-include).
    >
    > You'll need to manually run the extconf (rather than relying on the
    > Rakefile) to pass in those options and then run make as usual.


    OK, fine i'll give it a try ASAP and let you know.

    --
    une bévue
    Une bévue, Feb 25, 2006
    #18
  19. Ross Bamford

    Joe Guest

    Re: LibXML-Ruby 0.3.6

    This is great news - does the library include bindings for libxslt as
    well?


    Ross Bamford wrote:
    > LibXML-Ruby 0.3.6 is now available from Rubyforge. LibXML-Ruby is (as
    > you may have guessed) a C-language Ruby binding to the Gnome LibXML2
    > library, supporting a wide range of XML technologies and offering very
    > competitive performance across the board.
    >...
    Joe, Feb 25, 2006
    #19
  20. On Feb 23, 2006, at 8:32 PM, Ross Bamford wrote:
    > LibXML-Ruby 0.3.6 is now available from Rubyforge


    I am having some trouble with building.

    1) I have two libiconvs installed, one supplied with my OS in
    /usr and another in /opt/local. Using
    --with-iconv-dir=/opt/local fails to locate libiconv, but
    --with-iconv-dir=/usr works. I made a change to extconf.rb:

    $ diff libxml-ruby-0.3.6.orig/ext/xml/extconf.rb libxml-ruby-0.3.6/
    ext/xml/extconf.rb
    45,46c45,49
    < unless have_library('iconv','iconv_open') or have_library
    ('c','iconv_open') or
    < have_library('recode','iconv_open')
    ---
    >
    > unless have_library('iconv') or
    > have_library('iconv','iconv_open') or
    > have_library('c','iconv_open') or
    > have_library('recode','iconv_open')


    and --with-iconv-dir=/opt/local worked.

    2) You call two shell commands, xml2-config and xslt-config. I
    have two versions of libxml2 and libxslt installed, so this
    command is dependent on the correct command being in my PATH
    before the other one. I am not sure what to do about this
    problem.

    -- Daniel
    Daniel Harple, Feb 25, 2006
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian Gregory
    Replies:
    1
    Views:
    505
  2. Olav
    Replies:
    3
    Views:
    4,240
  3. Ross Bamford

    [ANN] Libxml-Ruby 0.3.8

    Ross Bamford, Apr 24, 2006, in forum: Ruby
    Replies:
    0
    Views:
    92
    Ross Bamford
    Apr 24, 2006
  4. Ross Bamford
    Replies:
    1
    Views:
    82
    James Edward Gray II
    Nov 22, 2006
  5. Dan Stevens (IAmAI)

    Cannot install ruby gem 'libxml-ruby'

    Dan Stevens (IAmAI), Mar 1, 2007, in forum: Ruby
    Replies:
    0
    Views:
    176
    Dan Stevens (IAmAI)
    Mar 1, 2007
Loading...

Share This Page