caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Andrew Herron <thespyder@programmer.net>
To: Jacques du Preez <jacquesdpz@gmail.com>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] OCaml HTML parsing & manipulation
Date: Mon, 25 Aug 2014 07:54:44 +1000	[thread overview]
Message-ID: <CALATSMbHJMUuwq4Jk97OBP_3CVi4uOvhuJOQxryv=wyXR6iq9A@mail.gmail.com> (raw)
In-Reply-To: <CAMBKu=cBTofJscPZ=cZnA2wvSnczJYN_S0P-0n6zY+8Kt0tb5A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]

I did an evaluation of HTML parsers back in February. Most of the options
are XML parsers, and a lot of them are very old. Other than Nethtml, I came
up with two alternatives to consider:

http://erratique.ch/software/xmlm
https://github.com/facebook/pfff/tree/master/lang_html

I didn't end up spending much time on either. It quickly became clear that
Nethtml was what I needed. It handles content that isn't strictly valid,
which was important to me, and has good performance.

Cheers,
Andy


On Mon, Aug 11, 2014 at 4:57 PM, Jacques du Preez <jacquesdpz@gmail.com>
wrote:

> Thanks. I eventually discovered ocamlnet, but I'm hoping there's maybe
> more than 1 option?
>
> ==============================
> Jacques du Preez
>
> Web: OpenLandscape.net
> Twitter: @jacquesdp
>
>
> On Sun, Aug 10, 2014 at 10:42 PM, Christophe Troestler <
> Christophe.Troestler@umons.ac.be> wrote:
>
>> Hi,
>>
>> On Sun, 10 Aug 2014 19:38:39 +0200, Jacques du Preez wrote:
>> >
>> > I've been searching for an OCaml library to parse HTML, and then be
>> able to
>> > query and manipulate it similar to jQuery.
>> >
>> > The JSoup Java library, http://jsoup.org, allows me to do this. Is
>> there
>> > something like this for OCaml?
>>
>> Nethtml in ocamlnet partly does what you need (you can easily write
>> recursive functions to extract the desired data from the HTML tree).
>>
>> Best,
>> C.
>>
>
>

[-- Attachment #2: Type: text/html, Size: 2408 bytes --]

      parent reply	other threads:[~2014-08-24 21:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-10 17:38 Jacques du Preez
     [not found] ` <20140810.224256.1353397051109538039.Christophe.Troestler@umons.ac.be>
2014-08-11  6:57   ` Jacques du Preez
2014-08-12  9:48     ` Paolo Donadeo
2014-08-24 21:54     ` Andrew Herron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALATSMbHJMUuwq4Jk97OBP_3CVi4uOvhuJOQxryv=wyXR6iq9A@mail.gmail.com' \
    --to=thespyder@programmer.net \
    --cc=caml-list@inria.fr \
    --cc=jacquesdpz@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).