# CHANGELOG.rdoc

Path: | CHANGELOG.rdoc
Last Update: | Mon Mar 15 10:33:05 -0600 2010

### 1.3.2 / 2009-06-22

- New Features
  - Nokogiri::XML::DTD#validate will validate your document
- Bugfixes
  - Nokogiri::XML::NodeSet#search will search top level nodes. GH 73
  - Removed namespace related methods from Nokogiri::XML::Document
  - Fixed a segfault when a namespace was added twice
  - Made nokogiri work with Snow Leopard GH 79
  - Mailing list has moved to: groups.google.com/group/nokogiri-talk
  - HTML fragments now correctly handle comments and CDATA blocks. GH 78
  - Nokogiri::XML::Document#clone is now an alias of dup
- Deprecations
  - Nokogiri::XML::SAX::Document#start_element_ns is deprecated, please switch to Nokogiri::XML::SAX::Document#start_element_namespace
  - Nokogiri::XML::SAX::Document#end_element_ns is deprecated, please switch to Nokogiri::XML::SAX::Document#end_element_namespace

### 1.3.1 / 2009-06-07

- Bugfixes
  - extconf.rb checks for optional RelaxNG and Schema functions
  - Namespace nodes are added to the Document node cache

### 1.3.0 / 2009-05-30

- New Features
  - Builder changes scope based on block arity
  - Builder supports methods ending in underscore similar to tagz
  - Nokogiri::XML::Node#<=> compares nodes based on Document position
  - Nokogiri::XML::Node#matches? returns true if Node can be found with given selector.
  - Nokogiri::XML::Node#ancestors now returns an Nokogiri::XML::NodeSet
  - Nokogiri::XML::Node#ancestors will match parents against optional selector
  - Nokogiri::HTML::Document#meta_encoding for getting the meta encoding
  - Nokogiri::HTML::Document#meta_encoding= for setting the meta encoding
  - Nokogiri::XML::Document#encoding= to set the document encoding
  - Nokogiri::XML::Schema for validating documents against XSD schema
  - Nokogiri::XML::RelaxNG for validating documents against RelaxNG schema
  - Nokogiri::HTML::ElementDescription for fetching HTML element descriptions
  - Nokogiri::XML::Node#description to fetch the node description
  - Nokogiri::XML::Node#accept implements Visitor pattern
  - bin/nokogiri for easily examining documents (Thanks Yutaka HARA!)
  - Nokogiri::XML::NodeSet now supports more Array and Enumerable operators: index, delete, slice, - (difference), + (concatenation), & (intersection), push, pop, shift, ==
  - Nokogiri.XML, Nokogiri.HTML take blocks that receive Nokogiri::XML::ParseOptions objects
  - Nokogiri::XML::Node#namespace returns a Nokogiri::XML::Namespace
  - Nokogiri::XML::Node#namespace= for setting a node‘s namespace
  - Nokogiri::XML::DocumentFragment and Nokogiri::HTML::DocumentFragment have a sensible API and a more robust implementation.
  - JRuby 1.3.0 support via FFI.
- Bugfixes
  - Fixed a problem with nil passed to CDATA constructor
  - Fragment method deals with regular expression characters (Thanks Joel!) LH 73
  - Fixing builder scope issues LH 61, LH 74, LH 70
  - Fixed a problem when adding a child could remove the child namespace LH#78
  - Fixed bug with unlinking a node then reparenting it. (GH#22)
  - Fixed failure to catch errors during XSLT parsing (GH#32)
  - Fixed a bug with attribute conditions in CSS selectors (GH#36)
  - Fixed intolerance of HTML attributes without values in Node#before/after/inner_html=. (GH#35)

### 1.2.3 / 2009-03-22

- Bugfixes
  - Fixing bug where a node is passed in to Node#new
  - Namespace should be assigned on DocumentFragment creation. LH 66
  - Nokogiri::XML::NodeSet#dup works GH 10
  - Nokogiri::HTML returns an empty Document when given a blank string GH#11
  - Adding a child will remove duplicate namespace declarations LH 67
  - Builder methods take a hash as a second argument

### 1.2.2 / 2009-03-14

- New features
  - Nokogiri may be used with soap4r. See XSD::XMLParser::Nokogiri
  - Nokogiri::XML::Node#inner_html= to set the inner html for a node
  - Nokogiri builder interface improvements
  - Nokogiri::XML::Node#swap swaps html for current node (LH 50)
- Bugfixes
  - Fixed a tag nesting problem in the Builder API (LH 41)
  - Nokogiri::HTML.fragment will properly handle text only nodes (LH 43)
  - Nokogiri::XML::Node#before will prepend text nodes (LH 44)
  - Nokogiri::XML::Node#after will append text nodes
  - Nokogiri::XML::Node#search automatically registers root namepsaces (LH 42)
  - Nokogiri::XML::NodeSet#search automatically registers namespaces
  - Nokogiri::HTML::NamedCharacters delegates to libxml2
  - Nokogiri::XML::Node#[] can take a symbol (LH 48)
  - vasprintf for windows updated. Thanks Geoffroy Couprie!
  - Nokogiri::XML::Node#[]= should not encode entities (LH 55)
  - Namespaces should be copied to reparented nodes (LH 56)
  - Nokogiri uses encoding set on the string for default in Ruby 1.9
  - Document#dup should create a new document of the same type (LH 59)
  - Document should not have a parent method (LH 64)

### 1.2.1 / 2009-02-23

- Bugfixes
  - Fixed a CSS selector space bug
  - Fixed Ruby 1.9 String Encoding (Thanks 角谷さん！)

### 1.2.0 / 2009-02-22

- New features
  - CSS search now supports CSS3 namespace queries
  - Namespaces on the root node are automatically registered
  - CSS queries use the default namespace
  - Nokogiri::XML::Document#encoding get encoding used for this document
  - Nokogiri::XML::Document#url get the document url
  - Nokogiri::XML::Node#add_namespace add a namespace to the node LH#38
  - Nokogiri::XML::Node#each iterate over attribute name, value pairs
  - Nokogiri::XML::Node#keys get all attribute names
  - Nokogiri::XML::Node#line get the line number for a node (Thanks Dirkjan Bussink!)
  - Nokogiri::XML::Node#serialize now takes an optional encoding parameter
  - Nokogiri::XML::Node#to_html, to_xml, and to_xhtml take an optional encoding
  - Nokogiri::XML::Node#to_str
  - Nokogiri::XML::Node#to_xhtml to produce XHTML documents
  - Nokogiri::XML::Node#values get all attribute values
  - Nokogiri::XML::Node#write_to writes the node to an IO object with optional encoding
  - Nokogiri::XML::ProcessingInstrunction.new
  - Nokogiri::XML::SAX::PushParser for all your push parsing needs.
- Bugfixes
  - Fixed Nokogiri::XML::Document#dup
  - Fixed header detection. Thanks rubikitch!
  - Fixed a problem where invalid CSS would cause the parser to hang
- Deprecations
  - Nokogiri::XML::Node.new_from_str will be deprecated in 1.3.0
- API Changes
  - Nokogiri::HTML.fragment now returns an XML::DocumentFragment (LH 32)

### 1.1.1

- New features
  - Added XML::Node#elem?
  - Added XML::Node#attribute_nodes
  - Added XML::Attr
  - XML::Node#delete added.
  - XML::NodeSet#inner_html added.
- Bugfixes
  - Not including an HTML entity for \r for HTML nodes.
  - Removed CSS::SelectorHandler and XML::XPathHandler
  - XML::Node#attributes returns an Attr node for the value.
  - XML::NodeSet implements to_xml

### 1.1.0

- New Features
  - Custom XPath functions are now supported. See Nokogiri::XML::Node#xpath
  - Custom CSS pseudo classes are now supported. See Nokogiri::XML::Node#css
  - Nokogiri::XML::Node#<< will add a child to the current node
- Bugfixes
  - Mutex lock on CSS cache access
  - Fixed build problems with GCC 3.3.5
  - XML::Node#to_xml now takes an indentation argument
  - XML::Node#dup takes an optional depth argument
  - XML::Node#add_previous_sibling returns new sibling node.

### 1.0.7

- Bugfixes
  - Fixed memory leak when using Dike
  - SAX parser now parses IO streams
  - Comment nodes have their own class
  - Nokogiri() should delegate to Nokogiri.parse()
  - Prepending rather than appending to ENV[‘PATH’] on windows
  - Fixed a bug in complex CSS negation selectors

### 1.0.6

- 5 Bugfixes
  - XPath Parser raises a SyntaxError on parse failure
  - CSS Parser raises a SyntaxError on parse failure
  - filter() and not() hpricot compatibility added
  - CSS searches via Node#search are now always relative
  - CSS to XPath conversion is now cached

### 1.0.5

- Bugfixes
  - Added mailing list and ticket tracking information to the README.txt
  - Sets ENV[‘PATH’] on windows if it doesn‘t exist
  - Caching results of NodeSet#[] on Document

### 1.0.4

- Bugfixes
  - Changed memory mangement from weak refs to document refs
  - Plugged some memory leaks
  - Builder blocks can call methods from surrounding contexts

### 1.0.3

- 5 Bugfixes
  - NodeSet now implements to_ary
  - XML::Document should not implement parent
  - More GC Bugs fixed. (Mike is AWESOME!)
  - Removed RARRAY_LEN for 1.8.5 compatibility. Thanks Shane Hanna.
  - inner_html fixed. (Thanks Yehuda!)

### 1.0.2

- 1 Bugfix
  - extconf.rb should not check for frex and racc

### 1.0.1

- 1 Bugfix
  - Made sure extconf.rb searched libdir and prefix so that ports libxml/ruby will link properly. Thanks lucsky!

### 1.0.0 / 2008-07-13

- 1 major enhancement
  - Birthday!

[Validate]