emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Linking Emacs with libxml2


From: Eric M. Ludlam
Subject: Re: Linking Emacs with libxml2
Date: Tue, 14 Sep 2010 20:55:23 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a1pre) Gecko/20091222 Shredder/3.1a1pre

Hi,

Sorry for the late reply.

The Semantic parser is a cheap regexp matcher that just looks for titles and <Hx> lines so things like Speedbar can show a high-level overview of your text.

It would be much better to use a real parser if one is available to provide to have that info in one place.

Eric

On 09/06/2010 03:19 PM, Chong Yidong wrote:
Lars Magne Ingebrigtsen<address@hidden>  writes:

Apparently libxml2 comes with a parser for "real world" HTML, which is
very intriguing:

http://www.xmlsoft.org/html/libxml-HTMLparser.html

If Emacs provided a native interface to this function, we could say

(parse-html "file.html")
=>  (:html (:head ...) (:body ...))

and get a nice parse tree out very fast.  (Parsing HTML from Emacs Lisp
is rather slow.)

Semantic already has a HTML parser, but I don't know how usable it is
for the purposes of writing a renderer.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]