Bugs item #28770, was opened at 2010-12-07 05:28 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28770&group_id=494
Category: None Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Tuan Duc Nguyen (ducnguyen) >Assigned to: Charlie Savage (cfis) Summary: XML::Node.empty? always return false!? Initial Comment: It seems that Node.empty? always return false. Or maybe my definition for an empty node was wrong. Example code: XML::Node.new('name').empty? #=> false I'm using ruby 1.9.2 and libxml-ruby 1.1.4. ---------------------------------------------------------------------- >Comment By: Charlie Savage (cfis) Date: 2011-04-22 21:32 Message: Actually, the code is correct but the documentation is wrong. From LibXML docs for xmlIsBlankNode (the underlying method). "Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node." So empty? is only true for text nodes. Docs have been updated. Thanks - Charlie ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1971&aid=28770&group_id=494 _______________________________________________ libxml-devel mailing list libxml-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/libxml-devel