caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: Gerd Stolpmann <info@gerd-stolpmann.de>
Cc: Caml list <caml-list@inria.fr>
Subject: Re: [Caml-list] Ocaml-Weblib?
Date: Tue, 3 Sep 2002 13:21:31 +0200 (MET DST)	[thread overview]
Message-ID: <Pine.LNX.3.95.1020903130844.6003A-100000@first.in-berlin.de> (raw)
In-Reply-To: <20020903004410.GG818@ice.gerd-stolpmann.de>

On Tue, 3 Sep 2002, Gerd Stolpmann wrote:

> 
> Am 2002.09.03 01:24 schrieb(en) Oliver Bandel:
> > On Tue, 3 Sep 2002, Gerd Stolpmann wrote:
[...]

> HTML parsing can be done with Nethtml. Simple example:
> 
> Nethtml.parse 
>   (new Netchannels.input_string "<HTML><HEAD>...</HEAD><BODY>...</BODY></HTML>")
> 
> Returns something like
> 
> [ Element("html",[], [ Element("head",[], [ ... ]);
>                        Element("body",[], [ ... ]) ) ]
> 
> just try it in the toploop.
[...]

OK, done. Is good... very good.
Yields expected results similar to the Perl-Libs for
such work; but it's soooo much better here, because it's
cleaner ( typesafety and clearer structure than the Perl-stuff :) ).

So, this is, what I have looked for. :)

Are there "opposite" tools, to out back the datastructure,
which will get here from html-parsing back into a html-file?
I think about reading a html-file, throwing out unnecessary
contents, adding interesting stuff, re-layouting the page
and create new pages, better for viewing as output.

(Often webpages are messy (called "good designed";-)) and
 I only need two or three parts of it. Creating a pagelaout,
 which matches my needs is intended here.)

Can this be done by the cgi-module?
Or is it part of the nethtml-lib?


[...]
> As far as I know there is no ready-to-use NNTP client. There are important
> components for an NNTP client, though. For example, there are parsers for
> messages in email format, and there is the working implementation for the
> POP protocol that has some similarities.

OK, if I can rely on the ocamlnet's sub-libraries, then I may write
such a client based on it.

[...]
> There is another object involved (input_stream) that has no effect if you
> read only from a string, but that allows you to read the header from 
> non-seekable files (e.g. pipelines or sockets). But this is definitely
> a feature for experts.

Well, I have done socket-programming .... in C. :)


[...]
> See the sources in netpop.ml for an example how to write a "telnet-style"
> client. Note that netpop.ml does not use sockets, it expects that the
> user of this module passes channels that are already connected sockets.

Hmhhh... how can be sockets read like channels?
Sockets must be handled unbuffered... Unix.read and such
functions... hmhhh is this done by Stream-module or similar
things? (Or could it be done in this way?)


[...]
> I hope this short introduction gives you the right impression of
> the library.

Yes. It's powerful (and wonderful:)).

With each more of impression of Ocaml's features (e.g.
module system) and such libraries, I see, that my interest
in perl and other languages fades away....

Ciao,
   Oliver

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2002-09-03 12:10 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-21 18:49 Oliver Bandel
2002-08-22  0:28 ` Gerd Stolpmann
2002-08-23 23:38   ` Oliver Bandel
2002-08-24 13:39     ` Gerd Stolpmann
2002-08-25 19:30       ` Oliver Bandel
2002-08-25 19:55       ` Oliver Bandel
2002-08-25 21:06         ` Alain Frisch
2002-08-25 21:33           ` Oliver Bandel
2002-08-25 23:37             ` Stefano Zacchiroli
2002-08-30 16:16               ` Oliver Bandel
2002-08-30 20:01                 ` Stefano Zacchiroli
2002-09-01 16:45                 ` Oliver Bandel
2002-09-02  7:22                   ` Stefano Zacchiroli
2002-09-02 10:47                     ` Oliver Bandel
2002-09-02 12:54                       ` Stefano Zacchiroli
2002-09-02 22:15                       ` Gerd Stolpmann
2002-09-02 23:24                         ` Oliver Bandel
2002-09-03  0:44                           ` Gerd Stolpmann
2002-09-03 11:21                             ` Oliver Bandel [this message]
2002-08-25 21:45           ` Gerd Stolpmann
2002-08-25 21:47         ` Gerd Stolpmann
2002-08-24 10:46   ` Dmitry Bely
2002-08-30 16:45     ` Alan Schmitt
2002-08-30 21:33       ` Oliver Bandel
2002-08-31  6:13         ` [Caml-list] Ocaml-Weblib? Michaël Grünewald
2002-08-31  8:16         ` [Caml-list] Ocaml-Weblib? Alan Schmitt
2002-09-05 20:13       ` Dmitry Bely
2002-09-06  5:02         ` Alan Schmitt
2002-09-06 17:32           ` Dmitry Bely
2002-09-07  9:37             ` Alan Schmitt

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=Pine.LNX.3.95.1020903130844.6003A-100000@first.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@inria.fr \
    --cc=info@gerd-stolpmann.de \
    /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).