Nokogiri Usage

| | Comments (0) | TrackBacks (0)

Just a quick reminder how easy xml transformation with xslt can be. Originally I used the libxml-ruby bindings but they threw a NoMethodException from deep inside the libxml.

After switching to nokogiri the code looked like this and worked as expected.


  xslt = Nokogiri::XSLT.parse(File.open('some_xslt.xsl'))
  result = xslt.transform(Nokogiri::XML.parse(xmlString))

0 TrackBacks

Listed below are links to blogs that reference this entry: Nokogiri Usage.

TrackBack URL for this entry: http://www.innoq.com/mt4/mt-tb.cgi/2516

Leave a comment

About this Entry

This page contains a single entry by Christian Albrecht published on March 4, 2010 10:39 AM.

jQuery Conference Talks online was the previous entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.0