Re: Using tidy for editing html
Vincent Finn <[email protected]> Mon, 19 Jun 2006 10:28:42 +0100
| Newsgroups | gmane.comp.web.html-tidy.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, Thanks for the quick response. > 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. I am using GetNodeText() (tidyNodeGetText() in C) to get the content of the text nodes and it seems to work fine. Is there a problem with using that? or did you mean something different by content? >> 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. I was thinking of using htmltidy to get to XHTML and then using Xerces but it seems to be a very convoluted and inefficient way to go. I'll examine the internals of the parser in more detail now that I know for certain it doesn't do what I want out of the box. Thanks, Vin