# LibXML-Ruby 0.3.6

**URL:** <https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130>\
**Category:** Ruby\
**Created:** [February 23, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130 "2006-02-23T20:35:36Z")\
**Posts on this page:** 9\
**Page:** 2

<div class="post-metadata">

**Author:** ![ross\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Post date:** [February 26, 2006, 12:06am UTC](https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130/21 "2006-02-26T00:06:39Z")

</div>

On Feb 23, 2006, at 8:32 PM, Ross B. 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.

```

1. 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

---

<div class="post-metadata">

**Author:** ![ross\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Post date:** [February 26, 2006, 1:31am UTC](https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130/22 "2006-02-26T01:31:34Z")

</div>

What is the difference between this and xml-smart. It looks like  
xml-smart  
has bindings for libxml also.  
[http://raa.ruby-lang.org/project/ruby-xml-smart](http://raa.ruby-lang.org/project/ruby-xml-smart)  
[http://www.pri.univie.ac.at/~mangler/ruby-xml-smart/](http://www.pri.univie.ac.at/~mangler/ruby-xml-smart/)

---

<div class="post-metadata">

**Author:** ![ross\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Post date:** [February 26, 2006, 12:15am UTC](https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130/23 "2006-02-26T00:15:43Z")

</div>

On Sun, 2006-02-26 at 07:48 +0900, Joe wrote:

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

We’re working separately on bringing the libxslt bindings up to date in  
the same way. We decided to concentrate on a first libxml release before  
moving on to that.

I’m hoping to get baseline code into CVS this week, with a release to  
follow ASAP.

---

<div class="post-metadata">

**Author:** ![ross\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Post date:** [February 26, 2006, 1:34am UTC](https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130/24 "2006-02-26T01:34:40Z")

</div>

On Sun, 2006-02-26 at 08:04 +0900, Daniel H. wrote:

> $ diff libxml-ruby-0.3.6.orig/ext/xml/extconf.rb libxml-ruby-0.3.6/
> 
> > ```
> > have_library('recode','iconv_open')
> > 
> > ```
> 
> ```
> and --with-iconv-dir=/opt/local worked.
> 
> ```

I’m not sure about this - I’m still finding my way around some things  
here, but I’m pretty sure we do need iconv\_open(3) in libiconv. Does it  
compile with this change?

I’m going to forward this as a possible change to the mailing list at  
removed\_email\_address@domain.invalid .

> 1. 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.

If you are passing --with-xml2- settings, you should be fine  
to comment-out the lines that run those scripts (for both CFLAGS and  
LDFLAGS). If that works for you I’ll fix it with a default to the  
dir\_config and commit it.

(I’m still finding new stuff in mkmf so if I’m missing anything, please  
let me know :))

---

<div class="post-metadata">

**Author:** ![ross\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Post date:** [February 26, 2006, 2:59am UTC](https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130/25 "2006-02-26T02:59:33Z")

</div>

On Feb 26, 2006, at 1:32 AM, Ross B. wrote:

> I’m not sure about this - I’m still finding my way around some things  
> here, but I’m pretty sure we do need iconv\_open(3) in libiconv.  
> Does it  
> compile with this change?

The problem is really strange. I have libiconv-1.9 installed in  
/usr, and libiconv-1.10 installed in /opt/local. mkmf says  
iconv\_open(3) isn’t available in v1.10, but it is. Have you  
tested with libiconv-1.10? Was there ever a libiconv that did not  
have iconv\_open()?

> If you are passing --with-xml2- settings, you should be fine  
> to comment-out the lines that run those scripts (for both CFLAGS and  
> LDFLAGS). If that works for you I’ll fix it with a default to the  
> dir\_config and commit it.

I did this, and all unittests passed.

– Daniel

---

<div class="post-metadata">

**Author:** ![ross\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Post date:** [February 26, 2006, 4:03am UTC](https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130/26 "2006-02-26T04:03:31Z")

</div>

On Sun, 2006-02-26 at 10:59 +0900, Daniel H. wrote:

> tested with libiconv-1.10? Was there ever a libiconv that did not  
> have iconv\_open()?

Hmm. The website lists 1.9.1 as the latest stable release. I need to  
look more into this I think, but one thing you might try is specifying  
–with-iconv-lib and --with-iconv-include separately, rather than  
–with-iconv-dir.

> > If you are passing --with-xml2- settings, you should be fine  
> > to comment-out the lines that run those scripts (for both CFLAGS and  
> > LDFLAGS). If that works for you I’ll fix it with a default to the  
> > dir\_config and commit it.
> 
> I did this, and all unittests passed.

Thanks, I’ll commit that fix tomorrow.

---

<div class="post-metadata">

**Author:** ![ross\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Post date:** [February 26, 2006, 1:59am UTC](https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130/27 "2006-02-26T01:59:02Z")

</div>

On Sun, 2006-02-26 at 09:28 +0900, Dominic S. wrote:

> What is the difference between this and xml-smart. It looks like xml-smart  
> has bindings for libxml also.  
> [http://raa.ruby-lang.org/project/ruby-xml-smart](http://raa.ruby-lang.org/project/ruby-xml-smart)  
> [http://www.pri.univie.ac.at/~mangler/ruby-xml-smart/](http://www.pri.univie.ac.at/~mangler/ruby-xml-smart/)

In all honesty, I’ve no idea. A quick glance suggests some differences  
in API, I think this is a slightly thinner layer on top of LibXML2 but  
then I could be entirely wrong…

I should mention that I’m just helping to maintain this code, it’s been  
around for some time…

---

<div class="post-metadata">

**Author:** ![ross\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Post date:** [February 26, 2006, 4:15am UTC](https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130/28 "2006-02-26T04:15:53Z")

</div>

On Feb 26, 2006, at 4:02 AM, Ross B. wrote:

> Hmm. The website lists 1.9.1 as the latest stable release.

[Index of /pub/gnu/libiconv](http://ftp.gnu.org/pub/gnu/libiconv/). I think the website is a  
little out-of-date – Last updated: $Date: 2003/08/05 20:02:34 $  
$Author: haible $

> I think, but one thing you might try is specifying  
> –with-iconv-lib and --with-iconv-include separately, rather than  
> –with-iconv-dir.

I tried this too, it did not work.

– Daniel

---

<div class="post-metadata">

**Author:** ![ross\_b](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/8edcca/32.png) [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Post date:** [February 26, 2006, 5:01am UTC](https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130/29 "2006-02-26T05:01:08Z")

</div>

There is small documentation error at  
[http://libxml.rubyforge.org/doc/classes/XML/Dtd.html](http://libxml.rubyforge.org/doc/classes/XML/Dtd.html)

The class is named Dtd, but DTD is used. Also, the name of two classes,  
Dtd and SaxParser, is inconsistent with the naming conventions of the  
library – it should be DTD and SAXParser.

– Daniel

[Previous page](https://www.ruby-forum.com/t/libxml-ruby-0-3-6/54130.md?page=1)
