Re: Question about conditional code (#ifdef NEVER)
Bjoern Hoehrmann <[email protected]> Fri, 21 Sep 2007 21:55:29 +0200
| Newsgroups | gmane.comp.web.html-tidy.devel |
|---|---|
| Message-ID | <[email protected]> |
* A.M. Sabuncu wrote: >I am seeing conditional code (for example in tidy-int.h) preceded by an >#ifdef NEVER -- what is the purpose of this? Debugging, historical, >posterity? Or is it to confuse new-comers to the code? ;-) Historical and debugging. >Also, is there an explanation of the opaque types, and their implementation? They essentially just hide private members of the various structures. >What started me on this journey was to simply get to the text of a text >node, so I can print it out during the parsing of the original HTML >document. Unless new functions have been added recently, there are just a few functions that essentially pretty print nodes ala tidyNodeGetText; they would give you text in some way, but you'd have e.g. special characters escaped. Internally, the text is stored in the lexbuf and individual node types point into the buffer. A simple even if in- efficient way to get the text is to let Tidy convert the document to XHTML and use an XML parser for further processing. -- 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/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/