From xmlblog at gmail.com Wed Sep 6 16:47:36 2006 From: xmlblog at gmail.com (Christian Romney) Date: Wed, 6 Sep 2006 16:47:36 -0400 Subject: [libxml-devel] Problem with namespaces Message-ID: Hi all, Perhaps I'm simply doing something wrong, but I can't seem to parse RSS 1.0. I've included below the irb session to illustrate what I mean. Google results yielded nothing along these lines. Any help much appreciated, thanks in advance. require 'xml/libxml' ==>true # Lots of xml elided for clarity doc = XML::Document.file('http://del.icio.us/rss/tag/ruby') ==> del.icio.us/tag/ruby http://del.icio.us/tag/ruby # Lets inspect the relevant namespaces... # RDF rdf = doc.root.namespace[0] ==>rdf rdf.prefix? ==>true rdf.prefix ==>"rdf" rdf.href ==>"http://www.w3.org/1999/02/22-rdf-syntax-ns#" # RSS 1.0 rss = doc.root.namespace[1] ==> rss.prefix? ==>false rss.prefix ==>nil rss.href ==>"http://purl.org/rss/1.0/" # This works, but commented out for simplicity # doc.find('//rdf:RDF') # This doesn't work (and should) doc.find('/rdf:RDF/channel/title').to_a ==>[] # Neither does this (and should) doc.find('//title').to_a ==>[] # Or this (and should) doc.root.find('//title').to_a ==>[] -- Best Regards, Christian Romney -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/libxml-devel/attachments/20060906/35b8293a/attachment.html From showaltb at gmail.com Fri Sep 22 09:48:27 2006 From: showaltb at gmail.com (Bob Showalter) Date: Fri, 22 Sep 2006 09:48:27 -0400 Subject: [libxml-devel] Signing off... Message-ID: Gentlemen, I have removed my name from the team members, as I've been a non-participant. I regret that shortly after the reinvigorated project first started rolling last year, my professional situation changed sharply and took me away from Ruby for a while. Ross jumped in and has done a great job moving the project forward with Sean. Best wishes with the project in the future. Bob From transfire at gmail.com Fri Sep 22 14:15:33 2006 From: transfire at gmail.com (TRANS) Date: Fri, 22 Sep 2006 14:15:33 -0400 Subject: [libxml-devel] Signing off... In-Reply-To: References: Message-ID: <4b6f054f0609221115h59443f99rc4af8ac1fe39091f@mail.gmail.com> On 9/22/06, Bob Showalter wrote: > Gentlemen, > > I have removed my name from the team members, as I've been a > non-participant. I regret that shortly after the reinvigorated project > first started rolling last year, my professional situation changed > sharply and took me away from Ruby for a while. Ross jumped in and has > done a great job moving the project forward with Sean. > > Best wishes with the project in the future. Thanks for your participation in any case. Take care, T. From rosco at roscopeco.co.uk Mon Sep 25 15:34:50 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Mon, 25 Sep 2006 20:34:50 +0100 Subject: [libxml-devel] Signing off... In-Reply-To: References: Message-ID: On Fri, 22 Sep 2006 14:48:27 +0100, Bob Showalter wrote: > Gentlemen, > > I have removed my name from the team members, as I've been a > non-participant. I regret that shortly after the reinvigorated project > first started rolling last year, my professional situation changed > sharply and took me away from Ruby for a while. Ahh well, I guess it happens to us all :). Hopefully it's all changes for the better, but in any event thanks for being involved. -- Ross Bamford - rosco at roscopeco.co.uk From nicholas.henry at gmail.com Thu Sep 28 09:52:59 2006 From: nicholas.henry at gmail.com (Nicholas Henry) Date: Thu, 28 Sep 2006 09:52:59 -0400 Subject: [libxml-devel] Installing libxml on osx as Gem Message-ID: I'm trying to install libxml on osx as a gem (Ruby 1.8.2). Any ideas on how to resolve these issues? (please see output below) Thank you, Nicholas Attempting local installation of 'libxml' Local gem file not found: libxml*.gem Attempting remote installation of 'libxml' Building native extensions. This could take a while... extconf.rb:64: undefined method `find_header' for main:Object (NoMethodError) ERROR: While executing gem ... (RuntimeError) ERROR: Failed to build gem native extension. Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8 for inspection. ruby extconf.rb install libxml\nchecking for socket() in -lsocket... no checking for gethostbyname() in -lnsl... no checking for atan() in -lm... no checking for atan() in -lm... yes checking for inflate() in -lz... yes checking for iconv_open() in -liconv... yes checking for xmlParseDoc() in -lxml2... yes checking for libxml/xmlversion.h... no From rosco at roscopeco.co.uk Thu Sep 28 18:00:20 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Thu, 28 Sep 2006 23:00:20 +0100 Subject: [libxml-devel] Installing libxml on osx as Gem In-Reply-To: References: Message-ID: Hi Nicholas, Heres a forwarded reply I posted on Ruby-talk earlier today. On Thu, 2006-09-28 at 12:35 +0900, nicholas.henry wrote: > I'm trying to install libxml on osx as a gem (Ruby 1.8.2). Any ideas on > how to resolve these issues? (please see output below) >Thank you, > Nicholas >Attempting local installation of 'libxml' > Local gem file not found: libxml*.gem > Attempting remote installation of 'libxml' > Building native extensions. This could take a while... > extconf.rb:64: undefined method `find_header' for main:Object > (NoMethodError) > ERROR: While executing gem ... (RuntimeError) > ERROR: Failed to build gem native extension. > Gem files will remain installed in > /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8 for inspection. > ruby extconf.rb install libxml\nchecking for socket() in -lsocket... > no > checking for gethostbyname() in -lnsl... no > checking for atan() in -lm... no > checking for atan() in -lm... yes > checking for inflate() in -lz... yes > checking for iconv_open() in -liconv... yes > checking for xmlParseDoc() in -lxml2... yes > checking for libxml/xmlversion.h... no > Hmm, find_header should be defined by mkmf, so I don't understand what's going on there. Maybe it's something to do with OSX - has anyone else seen this? Anyway, could you post up your ruby version? Also, the results of running this: $ ruby -rmkmf -e 'find_header("libxml/xmlversion.h", "/usr/include/libxml2")' Thanks, -- Ross Bamford - rosco at roscopeco.REMOVE.co.uk From nicholas.henry at gmail.com Thu Sep 28 21:37:54 2006 From: nicholas.henry at gmail.com (Nicholas Henry) Date: Thu, 28 Sep 2006 21:37:54 -0400 Subject: [libxml-devel] Installing libxml on osx as Gem In-Reply-To: References: Message-ID: Hello Ross: Here are my results: s$ ruby -v ruby 1.8.2 (2004-12-25) [powerpc-darwin7.8.0] $ ruby -rmkmf -e 'find_header("libxml/xmlversion.h", "/usr/include/libxml2")' -e:1: undefined method `find_header' for main:Object (NoMethodError) Cheers, Nicholas On 9/28/06, Ross Bamford wrote: > Hi Nicholas, > > Heres a forwarded reply I posted on Ruby-talk earlier today. > > > > On Thu, 2006-09-28 at 12:35 +0900, nicholas.henry wrote: > > I'm trying to install libxml on osx as a gem (Ruby 1.8.2). Any ideas on > > how to resolve these issues? (please see output below) > >Thank you, > > Nicholas > >Attempting local installation of 'libxml' > > Local gem file not found: libxml*.gem > > Attempting remote installation of 'libxml' > > Building native extensions. This could take a while... > > extconf.rb:64: undefined method `find_header' for main:Object > > (NoMethodError) > > ERROR: While executing gem ... (RuntimeError) > > ERROR: Failed to build gem native extension. > > Gem files will remain installed in > > /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8 for inspection. > > ruby extconf.rb install libxml\nchecking for socket() in -lsocket... > > no > > checking for gethostbyname() in -lnsl... no > > checking for atan() in -lm... no > > checking for atan() in -lm... yes > > checking for inflate() in -lz... yes > > checking for iconv_open() in -liconv... yes > > checking for xmlParseDoc() in -lxml2... yes > > checking for libxml/xmlversion.h... no > > > > Hmm, find_header should be defined by mkmf, so I don't understand what's > going on there. Maybe it's something to do with OSX - has anyone else > seen this? > > Anyway, could you post up your ruby version? Also, the results of > running this: > > $ ruby -rmkmf -e 'find_header("libxml/xmlversion.h", > "/usr/include/libxml2")' > > Thanks, > -- > Ross Bamford - rosco at roscopeco.REMOVE.co.uk > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > From rosco at roscopeco.co.uk Fri Sep 29 02:15:58 2006 From: rosco at roscopeco.co.uk (Ross Bamford) Date: Fri, 29 Sep 2006 07:15:58 +0100 Subject: [libxml-devel] Installing libxml on osx as Gem In-Reply-To: References: Message-ID: Hi, On Fri, 29 Sep 2006 02:37:54 +0100, Nicholas Henry wrote: > Hello Ross: > > Here are my results: > > s$ ruby -v > ruby 1.8.2 (2004-12-25) [powerpc-darwin7.8.0] > $ ruby -rmkmf -e 'find_header("libxml/xmlversion.h", > "/usr/include/libxml2")' > -e:1: undefined method `find_header' for main:Object (NoMethodError) > Ahh, I missed that ruby version in your original message, sorry about that. I'm afraid you're going to need to upgrade your ruby to at least 1.8.3 to use the libxml gem. That said, it's been quite some time since we tested against that version, so I would recommend going for the latest (1.8.5) or at least 1.8.4 both of which we're fairly well tested with. If you don't mind a manual install, you _might_ be able to work around this by running extconf.rb manually. The setup is a little wierd (it's mainly a rake-based build usually) but something like the following should work (though you'll need to adjust the paths of course): $ cd libxml-ruby-0.3.8/ext/xml $ ruby extconf.rb --with-xml2-include=/usr/include/libxml2 $ cd .. $ su -c 'rake install' Hope that helps, > Cheers, > Nicholas > > On 9/28/06, Ross Bamford wrote: >> Hi Nicholas, >> >> Heres a forwarded reply I posted on Ruby-talk earlier today. >> >> >> >> On Thu, 2006-09-28 at 12:35 +0900, nicholas.henry wrote: >> > I'm trying to install libxml on osx as a gem (Ruby 1.8.2). Any ideas >> on >> > how to resolve these issues? (please see output below) >> >Thank you, >> > Nicholas >> >Attempting local installation of 'libxml' >> > Local gem file not found: libxml*.gem >> > Attempting remote installation of 'libxml' >> > Building native extensions. This could take a while... >> > extconf.rb:64: undefined method `find_header' for main:Object >> > (NoMethodError) >> > ERROR: While executing gem ... (RuntimeError) >> > ERROR: Failed to build gem native extension. >> > Gem files will remain installed in >> > /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8 for inspection. >> > ruby extconf.rb install libxml\nchecking for socket() in -lsocket... >> > no >> > checking for gethostbyname() in -lnsl... no >> > checking for atan() in -lm... no >> > checking for atan() in -lm... yes >> > checking for inflate() in -lz... yes >> > checking for iconv_open() in -liconv... yes >> > checking for xmlParseDoc() in -lxml2... yes >> > checking for libxml/xmlversion.h... no >> > >> >> Hmm, find_header should be defined by mkmf, so I don't understand what's >> going on there. Maybe it's something to do with OSX - has anyone else >> seen this? >> >> Anyway, could you post up your ruby version? Also, the results of >> running this: >> >> $ ruby -rmkmf -e 'find_header("libxml/xmlversion.h", >> "/usr/include/libxml2")' >> >> Thanks, >> -- >> Ross Bamford - rosco at roscopeco.REMOVE.co.uk >> _______________________________________________ >> libxml-devel mailing list >> libxml-devel at rubyforge.org >> http://rubyforge.org/mailman/listinfo/libxml-devel >> > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel > -- > This email has been verified as Virus free > Virus Protection and more available at http://www.plus.net -- Ross Bamford - rosco at roscopeco.co.uk From nicholas.henry at gmail.com Fri Sep 29 10:49:08 2006 From: nicholas.henry at gmail.com (Nicholas Henry) Date: Fri, 29 Sep 2006 10:49:08 -0400 Subject: [libxml-devel] Installing libxml on osx as Gem In-Reply-To: References: Message-ID: Thank you, Ross -- it was probably time I upgraded. Cheers, Nicholas On 9/29/06, Ross Bamford wrote: > Hi, > > On Fri, 29 Sep 2006 02:37:54 +0100, Nicholas Henry > wrote: > > > Hello Ross: > > > > Here are my results: > > > > s$ ruby -v > > ruby 1.8.2 (2004-12-25) [powerpc-darwin7.8.0] > > $ ruby -rmkmf -e 'find_header("libxml/xmlversion.h", > > "/usr/include/libxml2")' > > -e:1: undefined method `find_header' for main:Object (NoMethodError) > > > > Ahh, I missed that ruby version in your original message, sorry about > that. I'm afraid you're going to need to upgrade your ruby to at least > 1.8.3 to use the libxml gem. That said, it's been quite some time since we > tested against that version, so I would recommend going for the latest > (1.8.5) or at least 1.8.4 both of which we're fairly well tested with. > > If you don't mind a manual install, you _might_ be able to work around > this by running extconf.rb manually. The setup is a little wierd (it's > mainly a rake-based build usually) but something like the following should > work (though you'll need to adjust the paths of course): > > $ cd libxml-ruby-0.3.8/ext/xml > $ ruby extconf.rb --with-xml2-include=/usr/include/libxml2 > $ cd .. > $ su -c 'rake install' > > Hope that helps, > > > > > > > > > > > > > Cheers, > > Nicholas > > > > On 9/28/06, Ross Bamford wrote: > >> Hi Nicholas, > >> > >> Heres a forwarded reply I posted on Ruby-talk earlier today. > >> > >> > >> > >> On Thu, 2006-09-28 at 12:35 +0900, nicholas.henry wrote: > >> > I'm trying to install libxml on osx as a gem (Ruby 1.8.2). Any ideas > >> on > >> > how to resolve these issues? (please see output below) > >> >Thank you, > >> > Nicholas > >> >Attempting local installation of 'libxml' > >> > Local gem file not found: libxml*.gem > >> > Attempting remote installation of 'libxml' > >> > Building native extensions. This could take a while... > >> > extconf.rb:64: undefined method `find_header' for main:Object > >> > (NoMethodError) > >> > ERROR: While executing gem ... (RuntimeError) > >> > ERROR: Failed to build gem native extension. > >> > Gem files will remain installed in > >> > /usr/local/lib/ruby/gems/1.8/gems/libxml-ruby-0.3.8 for inspection. > >> > ruby extconf.rb install libxml\nchecking for socket() in -lsocket... > >> > no > >> > checking for gethostbyname() in -lnsl... no > >> > checking for atan() in -lm... no > >> > checking for atan() in -lm... yes > >> > checking for inflate() in -lz... yes > >> > checking for iconv_open() in -liconv... yes > >> > checking for xmlParseDoc() in -lxml2... yes > >> > checking for libxml/xmlversion.h... no > >> > > >> > >> Hmm, find_header should be defined by mkmf, so I don't understand what's > >> going on there. Maybe it's something to do with OSX - has anyone else > >> seen this? > >> > >> Anyway, could you post up your ruby version? Also, the results of > >> running this: > >> > >> $ ruby -rmkmf -e 'find_header("libxml/xmlversion.h", > >> "/usr/include/libxml2")' > >> > >> Thanks, > >> -- > >> Ross Bamford - rosco at roscopeco.REMOVE.co.uk > >> _______________________________________________ > >> libxml-devel mailing list > >> libxml-devel at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/libxml-devel > >> > > _______________________________________________ > > libxml-devel mailing list > > libxml-devel at rubyforge.org > > http://rubyforge.org/mailman/listinfo/libxml-devel > > -- > > This email has been verified as Virus free > > Virus Protection and more available at http://www.plus.net > > > > -- > Ross Bamford - rosco at roscopeco.co.uk > _______________________________________________ > libxml-devel mailing list > libxml-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/libxml-devel >