Oddness with gems

I am running 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] and I
installed the libxslt and libxml gems so that I could play with some
xslt. I set up this code:

#!/usr/bin/ruby

require ‘rubygems’

require ‘libxslt’
require ‘libxml’

Create a new XSL Transform

stylesheet_doc = XML::Document.file(‘browse.xsl’)
stylesheet = LibXSLT::Stylesheet.new(stylesheet_doc)

Transform a xml document

xml_doc = XML::Document.file(‘page.xml’)
result = stylesheet.apply(xml_doc)

puts result

But when I run it I get uninitialized constant XML (NameError). Any idea
how to go about debugging this?

Sorry I’m being so thick today.

Peter H. [email protected] wrote:

Transform a xml document

xml_doc = XML::Document.file(‘page.xml’)
result = stylesheet.apply(xml_doc)

puts result

But when I run it I get uninitialized constant XML (NameError). Any idea
how to go about debugging this?

The namespace changed. It is now called LibXML::XML::Document (and so
on). m.

Ah, thanks for that. Will get on with things now.

Thanks you