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.

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

···

Peter Hickman <peter@semantico.com> wrote:

#!/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?

--
matt neuburg, phd = matt@tidbits.com, Matt Neuburg’s Home Page
Leopard - http://www.takecontrolbooks.com/leopard-customizing.html
AppleScript - http://www.amazon.com/gp/product/0596102119
Read TidBITS! It's free and smart. http://www.tidbits.com

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

Thanks you