diff -urN libxml-ruby-0.3.8/ext/xml/extconf.rb libxml-ruby-0.3.8.patched/ext/xml/extconf.rb
--- libxml-ruby-0.3.8/ext/xml/extconf.rb	2006-08-19 22:51:02.000000000 +0900
+++ libxml-ruby-0.3.8.patched/ext/xml/extconf.rb	2006-08-19 22:39:26.000000000 +0900
@@ -89,7 +89,6 @@
 end
 
 $CFLAGS << ' ' << $INCFLAGS
-$INSTALLFILES = [["../xml/libxml.rb", "$(RUBYLIBDIR)", "../xml"]]
 
 create_header()
 create_makefile('xml/libxml_so')
diff -urN libxml-ruby-0.3.8/ext/xml/libxml.rb libxml-ruby-0.3.8.patched/ext/xml/libxml.rb
--- libxml-ruby-0.3.8/ext/xml/libxml.rb	2006-08-19 22:51:02.000000000 +0900
+++ libxml-ruby-0.3.8.patched/ext/xml/libxml.rb	1970-01-01 09:00:00.000000000 +0900
@@ -1,107 +0,0 @@
-# $Id: libxml.rb,v 1.1 2006/04/17 13:30:22 roscopeco Exp $ 
-# Please see the LICENSE file for copyright and distribution information 
-require 'xml/libxml_so'
-
-class XML::Node::Set
-  def empty? #:nodoc:
-  	self.length <= 0
-  end
-  
-  def first #:nodoc:
-  	self.each { |n| return n }
-  end
-end
-
-class XML::Document
-  include Enumerable
-
-  # maybe, maybe not...
-  def each(&blk) #:nodoc:
-    find('//*').each(&blk)
-  end
-end
-
-class XML::Node::Set 
-  # inefficient, but maybe can find a way to cache the
-  # ary and dump on change?
-  def [](i, count = nil) #:nodoc:
-    if count
-      to_a[i,count]
-    else
-      to_a[i]
-    end
-  end
-
-  def to_s #:nodoc:
-    to_a.to_s
-  end
-end
-
-module XML::SiblingEnum #:nodoc:all
-  private 
-  
-  # Iterates nodes and attributes
-  def siblings(node, &blk)
-    if n = node
-      loop do
-        blk.call(n)
-        break unless n = n.next
-      end
-    end 
-  end
-end
-
-class XML::Node
-  include XML::SiblingEnum
-  include Enumerable
-  include Comparable
-  
-  # maybe these don't belong on all nodes...
-  def each_child(&blk) #:nodoc:
-    siblings(child, &blk)   
-  end
-
-  def each_attr(&blk) #:nodoc:
-    siblings(properties, &blk)
-  end
-
-  # all siblings INCLUDING self
-  def each_sibling(&blk) #:nodoc:
-    siblings(self, &blk)
-  end
-  
-  # I guess this is what you'd expect?
-  alias :each :each_child
-
-  def to_a #:nodoc:
-    inject([]) { |ary,n| ary << n }
-  end
-  
-  def <=>(other) #:nodoc:
-    to_s <=> other.to_s
-  end  
-end
-
-class XML::Attr 
-  include XML::SiblingEnum
-  include Enumerable
-
-  def each_sibling(&blk) #:nodoc:
-    siblings(self,&blk)
-  end
-  
-  alias :each_attr :each_sibling
-  alias :each :each_sibling
-  
-  def to_h #:nodoc:
-    inject({}) do |h,a| h[a.name] = a.value end
-  end
-
-  def to_a #:nodoc:
-    inject([]) do |ary,a| ary << [a.name, a.value] end
-  end
-  
-  def to_s #:nodoc:
-    "#{name} = #{value}"
-  end
-end
diff -urN libxml-ruby-0.3.8/lib/xml/libxml.rb libxml-ruby-0.3.8.patched/lib/xml/libxml.rb
--- libxml-ruby-0.3.8/lib/xml/libxml.rb	1970-01-01 09:00:00.000000000 +0900
+++ libxml-ruby-0.3.8.patched/lib/xml/libxml.rb	2006-08-19 22:31:32.000000000 +0900
@@ -0,0 +1,107 @@
+# $Id: libxml.rb,v 1.1 2006/04/17 13:30:22 roscopeco Exp $ 
+# Please see the LICENSE file for copyright and distribution information 
+require 'xml/libxml_so'
+
+class XML::Node::Set
+  def empty? #:nodoc:
+  	self.length <= 0
+  end
+  
+  def first #:nodoc:
+  	self.each { |n| return n }
+  end
+end
+
+class XML::Document
+  include Enumerable
+
+  # maybe, maybe not...
+  def each(&blk) #:nodoc:
+    find('//*').each(&blk)
+  end
+end
+
+class XML::Node::Set 
+  # inefficient, but maybe can find a way to cache the
+  # ary and dump on change?
+  def [](i, count = nil) #:nodoc:
+    if count
+      to_a[i,count]
+    else
+      to_a[i]
+    end
+  end
+
+  def to_s #:nodoc:
+    to_a.to_s
+  end
+end
+
+module XML::SiblingEnum #:nodoc:all
+  private 
+  
+  # Iterates nodes and attributes
+  def siblings(node, &blk)
+    if n = node
+      loop do
+        blk.call(n)
+        break unless n = n.next
+      end
+    end 
+  end
+end
+
+class XML::Node
+  include XML::SiblingEnum
+  include Enumerable
+  include Comparable
+  
+  # maybe these don't belong on all nodes...
+  def each_child(&blk) #:nodoc:
+    siblings(child, &blk)   
+  end
+
+  def each_attr(&blk) #:nodoc:
+    siblings(properties, &blk)
+  end
+
+  # all siblings INCLUDING self
+  def each_sibling(&blk) #:nodoc:
+    siblings(self, &blk)
+  end
+  
+  # I guess this is what you'd expect?
+  alias :each :each_child
+
+  def to_a #:nodoc:
+    inject([]) { |ary,n| ary << n }
+  end
+  
+  def <=>(other) #:nodoc:
+    to_s <=> other.to_s
+  end  
+end
+
+class XML::Attr 
+  include XML::SiblingEnum
+  include Enumerable
+
+  def each_sibling(&blk) #:nodoc:
+    siblings(self,&blk)
+  end
+  
+  alias :each_attr :each_sibling
+  alias :each :each_sibling
+  
+  def to_h #:nodoc:
+    inject({}) do |h,a| h[a.name] = a.value end
+  end
+
+  def to_a #:nodoc:
+    inject([]) do |ary,a| ary << [a.name, a.value] end
+  end
+  
+  def to_s #:nodoc:
+    "#{name} = #{value}"
+  end
+end
diff -urN libxml-ruby-0.3.8/Rakefile libxml-ruby-0.3.8.patched/Rakefile
--- libxml-ruby-0.3.8/Rakefile	2006-08-19 22:51:02.000000000 +0900
+++ libxml-ruby-0.3.8.patched/Rakefile	2006-08-19 22:31:47.000000000 +0900
@@ -98,7 +98,7 @@
   rdoc.title    = "Libxml-Ruby API"
   rdoc.options << '--main' << 'README'
   rdoc.rdoc_files.include('README', 'LICENSE', 'TODO')
-  rdoc.rdoc_files.include('ext/xml/ruby_xml*.c', 'ext/xml/*.rb')
+  rdoc.rdoc_files.include('ext/xml/ruby_xml*.c', 'lib/xml/*.rb')
   rdoc.rdoc_files.include('*.rdoc')
 end
 
@@ -133,6 +133,7 @@
 end
 
 PKG_FILES = FileList[
+  'lib/xml/*.rb',
   'ext/xml/extconf.rb',
   '[A-Z]*',
   'ext/xml/*.c',
@@ -163,7 +164,7 @@
     s.files = PKG_FILES.to_a
 
     #### Load-time details
-    s.require_path = 'ext'
+    s.require_path = 'lib'
     
     #### Documentation and testing.
     s.has_rdoc = true
