Re: Using tidy for editing html

Bjoern Hoehrmann <[email protected]> Fri, 16 Jun 2006 18:45:52 +0200
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
* Vincent Finn wrote:
>I am using the C++ binding and it only seems to have read 
>functionality. Is that an oversight or is there a design
>reason for it?

That's correct, Tidy does not expose such functionality. Also note that
the read functionality is not complete, you cannot access the content of
text nodes, for example.

>Essentially I want to know is there any inherent restriction in 
>the design that would make adding functions like NewNode, 
>CloneNode and RemoveNode to the C++ classes a bad idea?

Well, Tidy is not really designed to enable this, so you would need some
hacks to make Tidy expose this in a good manner. It seems the current
developers are neither very interested in this and not committed to
maintaining such functionality. It should be possible, but you are
generally better off with simply converting Tidy's internal DOM to some
other DOM structure.
-- 
Björn Höhrmann · mailto:[email protected] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/