19 May '12, 6am

Nokogiriにcanonicalizeいつから載ってたんだ? #matsuerb

static VALUE add_namespace_definition(VALUE self, VALUE prefix, VALUE href) { xmlNodePtr node, namespacee; xmlNsPtr ns; Data_Get_Struct(self, xmlNode, node); namespacee = node ; ns = xmlSearchNs( node->doc, node, (const xmlChar *)(NIL_P(prefix) ? NULL : StringValuePtr(prefix)) ); if(!ns) { if (node->type != XML_ELEMENT_NODE) { namespacee = node->parent; } ns = xmlNewNs( namespacee, (const xmlChar *)StringValuePtr(href), (const xmlChar *)(NIL_P(prefix) ? NULL : StringValuePtr(prefix)) ); } if (!ns) return Qnil ; if(NIL_P(prefix) || node != namespacee) xmlSetNs(node, ns); return Nokogiri_wrap_xml_namespace(node->doc, ns); }

Full article: http://nokogiri.org/Nokogiri/XML/Node.html#method-i-children

Tweets

Nokogiri:

nokogiri.org 14 May '12, 1am

Nokogiri builder can be used for building XML and HTML documents. Synopsis: builder = Nokogiri::XML::Builder.new do |xml| ...

nokogiri | | your community gem host:

rubygems.org 14 May '12, 8pm

Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser. Among Nokogiri's many features is the ability to search documents vi...