Nokogiri v1.4.2 Release Notes
Release Date: 2010-05-22 // almost 14 years ago-
โ Added
- ๐
XML::Node#parse
will parse XML or HTML fragments with respect to the context node. XML::Node#namespaces
returns all namespaces defined in the node and all ancestor nodes (previously did not return ancestors' namespace definitions).- โ Added
Enumerable
toXML::Node
Nokogiri::XML::Schema#validate
now uses xmlSchemaValidateFile if a filename is passed, which is faster and more memory-efficient. GH #219XML::Document#create_entity
will create newEntityDecl
objects. GH #174- ๐ JRuby FFI implementation no longer uses
ObjectSpace._id2ref
, instead using Charles Nutter's rocking Weakling gem. Nokogiri::XML::Node#first_element_child
fetch the first child node that is an ELEMENT node.Nokogiri::XML::Node#last_element_child
fetch the last child node that is an ELEMENT node.Nokogiri::XML::Node#elements
fetch all children nodes that are ELEMENT nodes.Nokogiri::XML::Node#add_child
,#add_previous_sibling
,#before
,#add_next_sibling
,#after
,#inner_html
,#swap
and#replace
all now accept aNode
,DocumentFragment
,NodeSet
, or a string containing markup.Node#fragment?
indicates whether a node is aDocumentFragment
.
๐ Fixed
XML::NodeSet
is now always decorated (if the document has decorators). GH #198XML::NodeSet#slice
gracefully handles offset+length larger than the set length. GH #200XML::Node#content=
safely unlinks previous content. GH #203XML::Node#namespace=
takes nil as a parameterXML::Node#xpath
returns things other thanNodeSet
objects. GH #208- ๐
XSLT::StyleSheet#transform
accepts hashes for parameters. GH #223 - Psuedo selectors inside
not()
work. GH #205 - ๐
XML::Builder
doesn't break when nodes are unlinked. Thanks to vihai! GH #228 - ๐ Encoding can be forced on the SAX parser. Thanks Eugene Pimenov! GH #204
- ๐
XML::DocumentFragment
usesXML::Node#parse
to determine children. - ๐ Fixed a memory leak in xml reader. Thanks sdor! GH #244
Node#replace
returns the new child node as claimed in the RDoc. Previously returned +self+.
Notes
- ๐ The Windows gems now bundle DLLs for libxml 2.7.6 and libxslt 1.1.26. Prior to this release, libxml 2.7.3 and libxslt 1.1.24 were bundled.
- ๐