Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

EfTidy: The Tidy Library Wrapper

, 6 Sep 2013
A free component for HTML parsing and cleaning
eftidy130componentonly.zip
eftidy130src.zip
eftidy1312componentonly.zip
EfTidy132_Src.zip
EfTidy
EfTidy.def
EfTidy.vcxproj.filters
EfTidy.vcxproj.user
EfTidyAttr.rgs
EfTidyNode.rgs
EfTidyps.def
tidyCom.rgs
tidyOption.rgs
TidyMyLib
TidyMyLib.vcxproj.filters
TidyMyLib.vcxproj.user
eftidycom.zip
EfTidyCom
EfTidy
EfTidy.def
EfTidy.dsp
EfTidyAttr.rgs
EfTidyNode.rgs
EfTidyps.def
tidyCom.rgs
tidyOption.rgs
EfTidyCom.dsw
TidyLib
Src
Release
TidyLib.dsp
EFTidyCom132_Component.zip
EFTidyCom132-Component
EfTidy.dll
eftidycomsampleproject.zip
Sample Project
EfTidy.dll
Using IEfTidyNode and iEfTidyAttr
VbTidynode.frm
vbtidynode.vbp
vbtidynode.vbw
Using ITidyCom & ItidyOption
FirstTidy.vbp
FirstTidy.vbw
Form1.frm
Form1.frx
eftidycomsampleproject11.zip
eftidycomsampleproject12.zip
output
EfTidy.dll
eftidycomsrc11.zip
TidyMyLib.dsp
EfTidy.def
EfTidy.dsp
EfTidyAttr.rgs
EfTidyNode.rgs
EfTidyps.def
tidyCom.rgs
tidyOption.rgs
eftidycomsrc12.zip
~vssc
EfTidy.cpp.ver
EfTidy.h.ver
EfTidyAttr.cpp.ver
EfTidyAttr.h.ver
EfTidyNode.cpp.ver
EfTidyNode.h.ver
resource.h.ver
StdAfx.cpp.ver
StdAfx.h.ver
tidyCom.cpp.ver
tidyCom.h.ver
tidyOption.cpp.ver
tidyOption.h.ver
EfTidy.def
EfTidy.dsp
EfTidyAttr.rgs
EfTidyNode.rgs
EfTidyps.def
tidyCom.rgs
tidyOption.rgs
TidyMyLib.dsp
eftidycomsrc1312.zip
TidyMyLib.dsp
EfTidy.def
EfTidy.dsp
EfTidyAttr.rgs
EfTidyNode.rgs
EfTidyps.def
tidyCom.rgs
tidyOption.rgs
#ifndef __CLEAN_H__
#define __CLEAN_H__

/* clean.h -- clean up misuse of presentation markup

  (c) 1998-2005 (W3C) MIT, ERCIM, Keio University
  See tidy.h for the copyright notice.

  CVS Info:
    $Author: arnaud02 $ 
    $Date: 2005/02/15 13:48:24 $ 
    $Revision: 1.10 $ 

*/

void RenameElem( Node* node, TidyTagId tid );

void FixNodeLinks(Node *node);

Node* CleanNode( TidyDocImpl* doc, Node* node );

void FreeStyles( TidyDocImpl* doc );

/* Add class="foo" to node
*/
void AddClass( TidyDocImpl* doc, Node* node, ctmbstr classname );

void CleanDocument( TidyDocImpl* doc );

/* simplifies <b><b> ... </b> ...</b> etc. */
void NestedEmphasis( TidyDocImpl* doc, Node* node );

/* replace i by em and b by strong */
void EmFromI( TidyDocImpl* doc, Node* node );

/*
 Some people use dir or ul without an li
 to indent the content. The pattern to
 look for is a list with a single implicit
 li. This is recursively replaced by an
 implicit blockquote.
*/
void List2BQ( TidyDocImpl* doc, Node* node );

/*
 Replace implicit blockquote by div with an indent
 taking care to reduce nested blockquotes to a single
 div with the indent set to match the nesting depth
*/
void BQ2Div( TidyDocImpl* doc, Node* node );


Node *FindEnclosingCell( TidyDocImpl* doc, Node* node );

void DropSections( TidyDocImpl* doc, Node* node );

/* used to hunt for hidden preformatted sections */
Bool NoMargins(Node *node);

/* does element have a single space as its content? */
Bool IsSingleSpace(Lexer *lexer, Node *node);


/*
 This is a major clean up to strip out all the extra stuff you get
 when you save as web page from Word 2000. It doesn't yet know what
 to do with VML tags, but these will appear as errors unless you
 declare them as new tags, such as o:p which needs to be declared
 as inline.
*/
void CleanWord2000( TidyDocImpl* doc, Node *node);

Bool IsWord2000( TidyDocImpl* doc );

/* where appropriate move object elements from head to body */
void BumpObject( TidyDocImpl* doc, Node *html );

/* This is disabled due to http://tidy.sf.net/bug/681116 */
#if 0
void FixBrakes( TidyDocImpl* pDoc, Node *pParent );
#endif

void VerifyHTTPEquiv( TidyDocImpl* pDoc, Node *pParent );

void DropComments(TidyDocImpl* doc, Node* node);
void DropFontElements(TidyDocImpl* doc, Node* node, Node **pnode);
void WbrToSpace(TidyDocImpl* doc, Node* node);
void DowngradeTypography(TidyDocImpl* doc, Node* node);
void ReplacePreformattedSpaces(TidyDocImpl* doc, Node* node);
void NormalizeSpaces(Lexer *lexer, Node *node);
void ConvertCDATANodes(TidyDocImpl* doc, Node* node);

void FixAnchors(TidyDocImpl* doc, Node *node, Bool wantName, Bool wantId, Bool xmlId);
void FixXhtmlNamespace(TidyDocImpl* doc, Bool wantXmlns);
void FixLanguageInformation(TidyDocImpl* doc, Node* node, Bool wantXmlLang, Bool wantLang);


#endif /* __CLEAN_H__ */

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

About the Author

ThatsAlok
Software Developer (Senior)
India India
He used to have biography here Smile | :) , but now he will hire someone (for free offcourse Big Grin | :-D ), Who writes his biography on his behalf Smile | :)
 
He is Great Fan of Mr. Johan Rosengren (his idol),Lim Bio Liong, Nishant S and DavidCrow and Believes that, he will EXCEL in his life by following there steps!!!
 

For good 8 years he was Visual CPP MSMVP!

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 6 Sep 2013
Article Copyright 2004 by ThatsAlok
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid