Click here to Skip to main content
12,510,824 members (52,129 online)
Click here to Skip to main content

Stats

132.1K views
4.6K downloads
87 bookmarked
Posted

EfTidy: The Tidy Library Wrapper

, 6 Sep 2013 GPL3
A free component for HTML parsing and cleaning
EfTidy.dll
EfTidy.def
EfTidy.dsp
EfTidyAttr.rgs
EfTidyNode.rgs
EfTidyps.def
tidyCom.rgs
tidyOption.rgs
TidyMyLib.dsp
EfTidy.dll
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
EfTidy
EfTidy.def
EfTidy.dsp
EfTidyAttr.rgs
EfTidyNode.rgs
EfTidyps.def
tidyCom.rgs
tidyOption.rgs
EfTidyCom.dsw
TidyLib
Src
Release
TidyLib.dsp
EFTidyCom132-Component
EfTidy.dll
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
EfTidy.dll
output
EfTidy.dll
TidyMyLib.dsp
EfTidy.def
EfTidy.dsp
EfTidyAttr.rgs
EfTidyNode.rgs
EfTidyps.def
tidyCom.rgs
tidyOption.rgs
EfTidyCom.dsw
EfTidyCom.dsw
~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
TidyMyLib.dsp
EfTidy.def
EfTidy.dsp
EfTidyAttr.rgs
EfTidyNode.rgs
EfTidyps.def
tidyCom.rgs
tidyOption.rgs
#ifndef __PARSER_H__
#define __PARSER_H__

/* parser.h -- HTML Parser

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

    $Author: arnaud02 $ 
    $Date: 2005/08/03 18:07:01 $ 
    $Revision: 1.10 $ 

*/

#include "forward.h"

Bool CheckNodeIntegrity(Node *node);

/*
 used to determine how attributes
 without values should be printed
 this was introduced to deal with
 user defined tags e.g. Cold Fusion
*/
Bool IsNewNode(Node *node);

void CoerceNode(TidyDocImpl* doc, Node *node, TidyTagId tid, Bool obsolete, Bool expected);

/* extract a node and its children from a markup tree */
Node *RemoveNode(Node *node);

/* remove node from markup tree and discard it */
Node *DiscardElement( TidyDocImpl* doc, Node *element);

/* insert node into markup tree as the firt element
 of content of element */
void InsertNodeAtStart(Node *element, Node *node);

/* insert node into markup tree as the last element
 of content of "element" */
void InsertNodeAtEnd(Node *element, Node *node);

/* insert node into markup tree before element */
void InsertNodeBeforeElement(Node *element, Node *node);

/* insert node into markup tree after element */
void InsertNodeAfterElement(Node *element, Node *node);

Node *TrimEmptyElement( TidyDocImpl* doc, Node *element );
Node* DropEmptyElements(TidyDocImpl* doc, Node* node);


/* assumes node is a text node */
Bool IsBlank(Lexer *lexer, Node *node);


/*
 duplicate name attribute as an id
 and check if id and name match
*/
/* acceptable content for pre elements */
Bool PreContent( TidyDocImpl* doc, Node *node );

Bool IsJavaScript(Node *node);
Bool DescendantOf(Node *element, TidyTagId tid);

/*
  HTML is the top level element
*/
void ParseDocument( TidyDocImpl* doc );



/*
  XML documents
*/
Bool XMLPreserveWhiteSpace( TidyDocImpl* doc, Node *element );

void ParseXMLDocument( TidyDocImpl* doc );

#endif /* __PARSER_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)

Share

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!

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160929.1 | Last Updated 6 Sep 2013
Article Copyright 2004 by ThatsAlok
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid