Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » General » Downloads
 
Add your own
alternative version
Go to top

A managed wrapper for the HTML Tidy library

, 12 Jan 2007
A managed C++ for a small part of the HTML Tidy C library
zetahtmltidy_src.zip
ZetaHtmlTidy
DLL
release
mt.dep
ZetaHtmlTidy.dll
ZetaHtmlTidy.dll.intermediate.manifest
HtmlTidy
build
gmake
Makefile
gnuauto
configure.in
console
Makefile.am
include
Makefile.am
Makefile.am
setup.sh
src
Makefile.am
msvc
debug
mt.dep
tidy.exe.embed.manifest
tidy.exe.embed.manifest.res
tidy.exe.intermediate.manifest
DebugDLL
libtidy.dll.embed.manifest
libtidy.dll.embed.manifest.res
libtidy.dll.intermediate.manifest
libtidy.exp
mt.dep
MakeDLL.vc6
Makefile.vc6
release
libtidy.lib
mt.dep
tidy.exe.intermediate.manifest
tidy.map
releasedll
tidy.dsp
tidy.dsw
tidydll.dsp
tidylib.dsp
rpm
tidy.spec
console
include
src
Test
bin
Debug
Release
ZetaHtmlTidy.dll
obj
Debug
ResolveAssemblyReference.cache
TempPE
Release
ResolveAssemblyReference.cache
TempPE
Properties
#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 Code Project Open License (CPOL)

Share

About the Author

Uwe Keim
Chief Technology Officer Zeta Producer Desktop CMS
Germany Germany
Uwe does programming since 1989 with experiences in Assembler, C++, MFC and lots of web- and database stuff and now uses ASP.NET and C# extensively, too. He has also teached programming to students at the local university.
 
In his free time, he does climbing, running and mountain biking. Recently he became a father of a cute boy.
 
Some cool, free software from us:
 
Free Test Management Software - Intuitive, competitive, Test Plans. Download now!  
Homepage erstellen - Intuitive, very easy to use. Download now!  
Send large Files online for free by Email
Offline-Homepage-Baukasten

| Advertise | Privacy | Mobile
Web04 | 2.8.140926.1 | Last Updated 12 Jan 2007
Article Copyright 2007 by Uwe Keim
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid