Re:XML-RPC client module for Node.js (uses libxml.js)
by Maciek416 on Sunday December 13, 2009 @10:48AM
(#992798)
I notice this client is based on libxml.js.
Does anyone know if anyone is working on a "flexible" HTML/XHTML parser a la BeautifulSoup / Nokogiri / TagSoup, etc? Node could become very useful as a base for building scrapers if this existed.
Re:XML-RPC client module for Node.js (uses libxml.js)
by sprsquish on Sunday December 13, 2009 @12:55PM
(#992921)
I've been trying to model libxml.js after Nokogiri. I wanted to get something built and working first. The next step is to expose libxml2's html parser.
Someone else has started working on find-by-CSS a la Nokogiri. I'll merge that into libxml.js when it's ready.
BTW, I'm looking for more help on this project. A new job has diminished the amount of time I can spend on OSS projects.
Re:XML-RPC client module for Node.js (uses libxml.js)
by Sephr on Sunday December 13, 2009 @02:47PM
(#993021)
Why use libxml when JavaScript already has a standard XML API, E4X (ECMAScript for XML), as specified by ECMA 357? At least libxml should use the faster native XML support behind the scenes if available.
Does anyone know if anyone is working on a "flexible" HTML/XHTML parser a la BeautifulSoup / Nokogiri / TagSoup, etc? Node could become very useful as a base for building scrapers if this existed.
Someone else has started working on find-by-CSS a la Nokogiri. I'll merge that into libxml.js when it's ready.
BTW, I'm looking for more help on this project. A new job has diminished the amount of time I can spend on OSS projects.
I went ahead and wrote a very simple test for HTML parsing and added an parseHTML() binding. I've sent you a pull request.
You can check out the commit here:
http://github.com/Maciek416/libxmljs/commit/87f28186cd4d2f2f...
http://code.google.com/p/v8/issues/detail?id=235
"There are currently no plans for implementing E4X in V8."
This doesn't seem to have moved forward, and the thread ends in a link to libxmljs :)