<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -3,6 +3,7 @@
 * New Features
 
   * Added Nokogiri::LIBXML_ICONV_ENABLED
+  * Alias Node#[] to Node#attr
 
 * Bugfixes
 </diff>
      <filename>CHANGELOG.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -192,6 +192,11 @@ module Nokogiri
         xpath(*rules)
       end
 
+      def &gt;&gt; rule
+        ns = document.root.namespaces
+        xpath CSS.xpath_for(rule, :prefix =&gt; &quot;./&quot;, :ns =&gt; ns).first
+      end
+
       ###
       # Search for the first occurrence of +path+.
       # Returns nil if nothing is found, otherwise a Node.
@@ -229,6 +234,7 @@ module Nokogiri
       alias :previous       :previous_sibling
       alias :remove         :unlink
       alias :get_attribute  :[]
+      alias :attr           :[]
       alias :set_attribute  :[]=
       alias :text           :content
       alias :inner_text     :content</diff>
      <filename>lib/nokogiri/xml/node.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,6 +17,11 @@ module Nokogiri
         eohtml
       end
 
+      def test_attr
+        node = @html.at('div.baz')
+        assert_equal node['class'], node.attr('class')
+      end
+
       def test_get_attribute
         element = @html.at('div')
         assert_equal 'baz', element.get_attribute('class')</diff>
      <filename>test/html/test_node.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>be1d9407eb9a32fa88963d59b4b2f38e142e5ffe</id>
    </parent>
  </parents>
  <author>
    <name>Aaron Patterson</name>
    <email>aaron.patterson@gmail.com</email>
  </author>
  <url>http://github.com/tenderlove/nokogiri/commit/89899f9498d62dfe6441611aa258c81bc299e333</url>
  <id>89899f9498d62dfe6441611aa258c81bc299e333</id>
  <committed-date>2009-11-05T20:48:38-08:00</committed-date>
  <authored-date>2009-11-05T20:48:38-08:00</authored-date>
  <message>alias Node#[] to Node#attr</message>
  <tree>b4fc22ed8cfd786aef7e242d6d12d591f560fdab</tree>
  <committer>
    <name>Aaron Patterson</name>
    <email>aaron.patterson@gmail.com</email>
  </committer>
</commit>
