From jan@swi.psy.uva.nl Wed Jan 31 17:13:17 2001 Received: from gollem.swi.psy.uva.nl (root@gollem [145.18.152.30]) by swi.psy.uva.nl (8.11.2/8.11.2) with ESMTP id f0VGDGZ19348; Wed, 31 Jan 2001 17:13:17 +0100 (MET) Received: from localhost (localhost [[UNIX: localhost]]) by gollem.swi.psy.uva.nl (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id RAA15235; Wed, 31 Jan 2001 17:13:16 +0100 From: Jan Wielemaker Organization: SWI, University of Amsterdam To: Alberto Ruiz Cristina , Swi Prolog Mailing List Subject: Re: [SWIPL] XML Parser (SGML package) Date: Wed, 31 Jan 2001 17:09:06 +0100 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain References: <3A78371F.EAFF8224@isys.dia.fi.upm.es> In-Reply-To: <3A78371F.EAFF8224@isys.dia.fi.upm.es> MIME-Version: 1.0 Message-Id: <01013117131605.09758@gollem> Content-Transfer-Encoding: 8bit On Wed, 31 Jan 2001, Alberto Ruiz Cristina wrote: > > >Hello! >

I have succesfully tried the validating XML parser included in Sgml >package. I use the "load_structure" predicate, and I get a list of content >as a result. >

I have also tried the "sgml_parse" predicate, and I have read in the >documentation that output can be set to a stream. But how can you specify >output in that predicate? >

Thank you >

Alberto Ruiz Cristina >
Spain I don't have an HTML parser built-in, but reading between the tags I think I know what you want ... *output* cannot be set to a stream (it is a Prolog term), but *input* can. Just have a look at load_structure in that library and the PDF documentation and you'll get the picture. Basically it is something along the lines: new_sgml_parser(Parser, Options), sgml_parse(Parser, [ document(DOM), source(Stream), ... ]) ... Cheers --- Jan