<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Serabe Reloaded &#187; nokogiri</title>
	<atom:link href="http://www.serabe.com/tag/nokogiri/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serabe.com</link>
	<description>Conecto ergo sum. Non conecto ergo urgueo.</description>
	<lastBuildDate>Sun, 09 Oct 2011 21:30:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Transforming CSS selector to an XPath query</title>
		<link>http://www.serabe.com/2011/09/09/transforming-css-selector-to-xpath/</link>
		<comments>http://www.serabe.com/2011/09/09/transforming-css-selector-to-xpath/#comments</comments>
		<pubDate>Fri, 09 Sep 2011 18:42:41 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[nokogiri]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=589</guid>
		<description><![CDATA[So. Easy. PLAIN TEXT RUBY: require 'nokogiri'; Nokogiri::CSS.xpath_for&#40;css_selector&#41; &#160;]]></description>
			<content:encoded><![CDATA[<p>So. Easy.</p>
<div class="igBar"><span id="lruby-2"><a href="#" onclick="javascript:showPlainTxt('ruby-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-2">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> 'nokogiri'; Nokogiri::CSS.<span style="color:#9900CC;">xpath_for</span><span style="color:#006600; font-weight:bold;">&#40;</span>css_selector<span style="color:#006600; font-weight:bold;">&#41;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Transforming CSS selector to an XPath query on Serabe Reloaded',url: 'http://www.serabe.com/2011/09/09/transforming-css-selector-to-xpath/',contentID: 'post-589',suggestTags: 'nokogiri,programming,Ruby',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Transforming CSS selector to an XPath query" alt="article clipper Transforming CSS selector to an XPath query" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2011%2F09%2F09%2Ftransforming-css-selector-to-xpath%2F&amp;title=Transforming%20CSS%20selector%20to%20an%20XPath%20query" id="wpa2a_2"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Transforming CSS selector to an XPath query"  title="Transforming CSS selector to an XPath query" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2011/09/09/transforming-css-selector-to-xpath/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Helping Nokogiri. Take II</title>
		<link>http://www.serabe.com/2009/12/31/helping-nokogiri-take-ii/</link>
		<comments>http://www.serabe.com/2009/12/31/helping-nokogiri-take-ii/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 22:42:51 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[nokogiri]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=455</guid>
		<description><![CDATA[Nokogiri and Pizza, what else can you ask for? Ok. My fault. Now, let's go get some work done. First, if you haven't done it, read the previous post about helping nokogiri and forgot about the script and memory leak. It seems that there are more important issues, so let's fix them first. First run [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp">
<dl class="wp-caption alignright" style="width: 250px;">
<dt class="wp-caption-dt"><a rel="nofollow" href="http://www.flickr.com/photos/8168925@N02/4218563829/" title="PIZZA PRO 3000"  target="_blank"><img style="border: 0px initial initial;" title="Nokogiri and Pizza, what else can you ask for?" src="http://farm5.static.flickr.com/4040/4218563829_bf9f5519dd_m.jpg" border="0" alt="4218563829 bf9f5519dd m Helping Nokogiri. Take II" width="240" height="174" /></a></dt>
<dd class="wp-caption-dd">Nokogiri and Pizza, what else can you ask for?<a title="&lt;/dd"></a></dd>
</dl>
<p><a title="&lt;/dd"></a></p>
</div>
<p>Ok. My fault. Now, let's go get some work done.</p>
<p>First, if you haven't done it, read the <a href="http://www.serabe.com/2009/12/01/do-you-wanna-help-us-with-pure-java-nokogiri/" title="Do you wanna help us with pure-Java Nokogiri?" >previous post about helping nokogiri</a> and forgot about the script and memory leak. It seems that there are more important issues, so let's fix them first. First run <code>jruby test/test_jruby.rb</code> from Nokogiri root. You'll see a lot of errors (27 by now) and failures (14). Choose one, and get it green. After that, send me a pull request.</p>
<p>Ok. That sounds simple, but what if  the number of errors or failures raises? The rule I use is simple: keep the sum of both numbers going down and having a failure is better than having an error.</p>
<p>On the other hand, if you take a look at <a href="http://github.com/tenderlove/nokogiri/blob/java/test/test_jruby.rb" title="Github" >test/test_jruby.rb</a>, you'll see that not every test is in there. There is a reason for that. Even keeping the number of test low, you get a lot of errors/failures. If that annoys me with just 50 failures, imagine if I had a couple of hundreds errors. When all is right, I'll add some more to keep the fun on.</p>
<p>Photo by <a rel="nofollow" href="http://www.flickr.com/photos/unkiepaul/" title="Flickr" >Paul Johnston</a>.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Helping Nokogiri. Take II on Serabe Reloaded',url: 'http://www.serabe.com/2009/12/31/helping-nokogiri-take-ii/',contentID: 'post-455',suggestTags: 'jruby,nokogiri',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Helping Nokogiri. Take II" alt="article clipper Helping Nokogiri. Take II" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2009%2F12%2F31%2Fhelping-nokogiri-take-ii%2F&amp;title=Helping%20Nokogiri.%20Take%20II" id="wpa2a_4"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Helping Nokogiri. Take II"  title="Helping Nokogiri. Take II" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2009/12/31/helping-nokogiri-take-ii/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Do you wanna help us with pure-Java Nokogiri?</title>
		<link>http://www.serabe.com/2009/12/01/do-you-wanna-help-us-with-pure-java-nokogiri/</link>
		<comments>http://www.serabe.com/2009/12/01/do-you-wanna-help-us-with-pure-java-nokogiri/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 22:07:39 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[nokogiri]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=449</guid>
		<description><![CDATA[First things first, if you wanna help, you'll need to clone the git repo. Just: git clone git://github.com/tenderlove/nokogiri.git cd nokogiri git checkout --track -b java origin/java Install the dependencies. Just: rake install:deps Because it uses some native libraries, you'll need to do that with MRI. Finally, you'll need to generate some files, just run jruby [...]]]></description>
			<content:encoded><![CDATA[<p>First things first, if you wanna help, you'll need to clone the git repo. Just:</p>
<p><code>git clone git://github.com/tenderlove/nokogiri.git</code><br />
<code>cd nokogiri</code><br />
<code>git checkout --track -b java origin/java</code></p>
<p>Install the dependencies. Just:</p>
<p><code>rake install:deps</code></p>
<p>Because it uses some native libraries, you'll need to do that with MRI. Finally, you'll need to generate some files, just run <code>jruby -S rake java:spec</code>. For having a hprof file, you'll need to run <a href="http://gist.github.com/245784" >this script</a> with the following command:</p>
<p><code>jr -J-Xmx32m -J-XX:+HeapDumpOnOutOfMemoryError nokogiri_doc_frag.rb</code></p>
<p><em>-J-Xmx32m</em> limits the heap space to 32 Mb, and the other options makes the JVM to write a hprof file when a OutOfMemoryError is thrown. After that, you can inspect that file with the profiler you can find in NetBeans.</p>
<p>In next post, I'll comment where I think the problem is.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Do you wanna help us with pure-Java Nokogiri? on Serabe Reloaded',url: 'http://www.serabe.com/2009/12/01/do-you-wanna-help-us-with-pure-java-nokogiri/',contentID: 'post-449',suggestTags: 'help,jruby,nokogiri',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Do you wanna help us with pure Java Nokogiri?" alt="article clipper Do you wanna help us with pure Java Nokogiri?" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2009%2F12%2F01%2Fdo-you-wanna-help-us-with-pure-java-nokogiri%2F&amp;title=Do%20you%20wanna%20help%20us%20with%20pure-Java%20Nokogiri%3F" id="wpa2a_6"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Do you wanna help us with pure Java Nokogiri?"  title="Do you wanna help us with pure Java Nokogiri?" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2009/12/01/do-you-wanna-help-us-with-pure-java-nokogiri/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Final Status Update (or How to get Nokogiri in JRuby without FFI)</title>
		<link>http://www.serabe.com/2009/08/26/final-status-update/</link>
		<comments>http://www.serabe.com/2009/08/26/final-status-update/#comments</comments>
		<pubDate>Wed, 26 Aug 2009 17:59:41 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[nokogiri]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=433</guid>
		<description><![CDATA[Hi, all, sorry for the silence all these months, but I've been working hard on Nokogiri. First things first, it is not complete yet. Anyway, I'm gonna tell you how to build a gem and start working with it. photo credit: Matthew Byrne Clone the repo and checkout the java branch. git clone git://github.com/tenderlove/nokogiri.git git [...]]]></description>
			<content:encoded><![CDATA[<p>Hi, all,</p>
<p>sorry for the silence all these months, but I've been working hard on Nokogiri. First things first, it is not complete yet. Anyway, I'm gonna tell you how to build a gem and start working with it.</p>
<p><a rel="nofollow" href="http://www.flickr.com/photos/58643664@N00/3848826571/" title="Wooden vice - sharpening saw"  target="_blank"><img src="http://farm3.static.flickr.com/2485/3848826571_e2da6c85ed_m.jpg" border="0" alt="3848826571 e2da6c85ed m Final Status Update (or How to get Nokogiri in JRuby without FFI)"  title="Final Status Update (or How to get Nokogiri in JRuby without FFI)" /></a><br />
<small><a href="http://creativecommons.org/licenses/by-nc/2.0/" title="Attribution-NonCommercial License"  target="_blank"><img src="http://www.serabe.com/wp-content/plugins/photo-dropper/images/cc.png" border="0" alt="cc Final Status Update (or How to get Nokogiri in JRuby without FFI)" width="16" height="16" align="absmiddle" title="Final Status Update (or How to get Nokogiri in JRuby without FFI)" /></a> <a href="http://www.photodropper.com/photos/"  target="_blank">photo</a> credit: <a rel="nofollow" href="http://www.flickr.com/photos/58643664@N00/3848826571/" title="Matthew Byrne"  target="_blank">Matthew Byrne</a></small></p>
<p>Clone the <a href="http://github.com/tenderlove/nokogiri/tree/master" >repo</a> and checkout the <em><a href="http://github.com/tenderlove/nokogiri/tree/java" >java</a></em> branch.<br />
<code><br />
git clone git://github.com/tenderlove/nokogiri.git<br />
git checkout --track -b java origin/java<br />
</code><br />
Next step: build the gem. As easy as <code>jruby -S rake java:gem</code>. Maybe, you need to install rexical and racc. <code>jruby -S rake install:deps</code> would do.</p>
<p>Finally, you have a gem in the <em>pkg</em> folder. Install it, and you're done.</p>
<p>Updated: Take a look <a href="http://www.serabe.com/2009/12/01/do-you-wanna-help-us-with-pure-java-nokogiri/" >here</a> if you wanna help.</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Final Status Update (or How to get Nokogiri in JRuby without FFI) on Serabe Reloaded',url: 'http://www.serabe.com/2009/08/26/final-status-update/',contentID: 'post-433',suggestTags: 'gem,jruby,nokogiri,xml',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Final Status Update (or How to get Nokogiri in JRuby without FFI)" alt="article clipper Final Status Update (or How to get Nokogiri in JRuby without FFI)" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2009%2F08%2F26%2Ffinal-status-update%2F&amp;title=Final%20Status%20Update%20%28or%20How%20to%20get%20Nokogiri%20in%20JRuby%20without%20FFI%29" id="wpa2a_8"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Final Status Update (or How to get Nokogiri in JRuby without FFI)"  title="Final Status Update (or How to get Nokogiri in JRuby without FFI)" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2009/08/26/final-status-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Status Update: RMagick4J, Nokogiri, ruby2java and a possible MagickWand4J</title>
		<link>http://www.serabe.com/2009/06/06/status-update-rmagick4j-nokogiri-ruby2java-and-a-possible-magickwand4j/</link>
		<comments>http://www.serabe.com/2009/06/06/status-update-rmagick4j-nokogiri-ruby2java-and-a-possible-magickwand4j/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 10:00:30 +0000</pubDate>
		<dc:creator>Serabe</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[gsoc]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[magickwand]]></category>
		<category><![CDATA[nokogiri]]></category>
		<category><![CDATA[rmagick4j]]></category>
		<category><![CDATA[ruby2java]]></category>
		<category><![CDATA[siesta]]></category>
		<category><![CDATA[status update]]></category>

		<guid isPermaLink="false">http://www.serabe.com/?p=429</guid>
		<description><![CDATA[It's been long time since last status update, but there are some things to tell, so here I am. Thankfully, this year I'm a GSoC student again (and my mentor is Tom too). The main part of my project would be porting Nokogiri to JRuby, so I haven't code for RMagick for a while now. [...]]]></description>
			<content:encoded><![CDATA[<p>It's been long time since last <a href="http://www.serabe.com/2009/03/23/rmagick4j-037-happy-birthmonth-released/" >status update</a>, but there are some things to tell, so here I am.</p>
<p>Thankfully, this year I'm a GSoC student again (and my mentor is Tom too). The main part of my project would be porting Nokogiri to JRuby, so I haven't code for RMagick for a while now.</p>
<p>Let's start with the status update then.</p>
<p><strong>Nokogiri</strong></p>
<p>I've been working on Nokogiri for a while. I forked <a href="http://github.com/headius/nokogiri/tree/master" >Charles' repo</a> in Github, and I've implemented some cool features. For example, today I got my <a href="http://github.com/Serabe/nokogiri/commit/9634a4509ba77e6062c2bad5cfc742a557b46717" >XML::Reader implementation to pass all tests in test_reader.rb</a>. I hope I'll be able to make a release this month (cross your fingers).</p>
<p>On the other hand, I got my <a href="http://github.com/tenderlove/nokogiri/commit/53a62edb8bf057b1a85e2af8462b01aa3fafee16" >first patch accepted in Nokogiri's main repo</a>.</p>
<p><strong>RMagick4J</strong></p>
<p>Not to much work done here, sorry. I haven't code anything for a while now. Migrating from mercurial to git is already planned, but before that I would like to do a few commits more. Anyway, I'm quite happy with this project. Some people are using it and <a href="http://kenai.com/jira/browse/RMAGICK4J-9" >reporting bugs</a> (in the end, those little things are all that matters). What else can I ask for?</p>
<p>Please, if you find a bug, report it <a href="http://kenai.com/jira/browse/RMAGICK4J" >here</a>.</p>
<p><strong>MagickWand</strong></p>
<p>Tim Hunter (creator of <a href="http://rmagick.rubyforge.org/" >RMagick</a>) released <a href="http://magickwand.rubyforge.org/" >MagickWand</a> recently. I've been considering porting it to JRuby too. I have to take a deeper look at the C code, but, by now, I think it could be a good way to lead RMagick4J development. If finally I port it, I will split <a href="http://kenai.com/projects/rmagick4j" >RMagick4J</a> in two projects (Magick4J and RMagick4J). This way, MagickWand4J and <a href="http://kenai.com/projects/rmagick4j" >RMagick4J</a> would share the same java codebase, as <a href="http://magickwand.rubyforge.org/" >MagickWand</a> and <a href="http://rmagick.rubyforge.org/" >RMagick</a> share <a href="http://www.imagemagick.org/script/index.php" >ImageMagick</a>.</p>
<p><strong>ruby2java</strong></p>
<p>Take a look <a href="http://kenai.com/projects/ruby2java/pages/Home" >here</a>. Awesome, isn't it? And as soon as I have some time to work on it, <a href="http://kenai.com/projects/siesta" >siesta</a> will be out too...</p>
<p><strong>P.D.</strong> By the way, no more personal stuff in this blog. That stuff is now <a href="http://sergio.arbeo.net" >here</a>, and only in Spanish (sorry about that).</p>
<div class="evernoteSiteMemory"><a href="javascript:" onclick="Evernote.doClip({title: 'Status Update: RMagick4J, Nokogiri, ruby2java and a possible MagickWand4J on Serabe Reloaded',url: 'http://www.serabe.com/2009/06/06/status-update-rmagick4j-nokogiri-ruby2java-and-a-possible-magickwand4j/',contentID: 'post-429',suggestTags: 'gsoc,jruby,magickwand,nokogiri,rmagick4j,ruby2java,siesta,status update',providerName: 'Serabe Reloaded',styling: 'text' });return false" class="evernoteSiteMemoryLink"><img src="http://static.evernote.com/article-clipper.png" class="evernoteSiteMemoryButton" title="Status Update: RMagick4J, Nokogiri, ruby2java and a possible MagickWand4J" alt="article clipper Status Update: RMagick4J, Nokogiri, ruby2java and a possible MagickWand4J" />
				</a>				<div class="evernoteSiteMemoryClear">&nbsp;</div>
</div><p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.serabe.com%2F2009%2F06%2F06%2Fstatus-update-rmagick4j-nokogiri-ruby2java-and-a-possible-magickwand4j%2F&amp;title=Status%20Update%3A%20RMagick4J%2C%20Nokogiri%2C%20ruby2java%20and%20a%20possible%20MagickWand4J" id="wpa2a_10"><img src="http://www.serabe.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Status Update: RMagick4J, Nokogiri, ruby2java and a possible MagickWand4J"  title="Status Update: RMagick4J, Nokogiri, ruby2java and a possible MagickWand4J" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.serabe.com/2009/06/06/status-update-rmagick4j-nokogiri-ruby2java-and-a-possible-magickwand4j/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

