C# Class Tidy.Core.HtmlTidy

HTML parser and pretty printer

(c) 1998-2000 (W3C) MIT, INRIA, Keio University See Tidy.cs for the copyright notice. Derived from HTML Tidy Release 4 Aug 2000

Copyright (c) 1998-2000 World Wide Web Consortium (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved.

Contributing Author(s):
Dave Raggett
Andy Quick (translation to Java) Seth Yates (translation to C#)

The contributing author(s) would like to thank all those who helped with testing, bug fixes, and patience. This wouldn't have been possible without all of you.

COPYRIGHT NOTICE:
This software and documentation is provided "as is," and the copyright holders and contributing author(s) make no representations or warranties, express or implied, including but not limited to, warranties of merchantability or fitness for any particular purpose or that the use of the software or documentation will not infringe any third party patents, copyrights, trademarks or other rights.

The copyright holders and contributing author(s) will not be liable for any direct, indirect, special or consequential damages arising out of any use of the software or documentation, even if advised of the possibility of such damage.

Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, documentation and executables, for any purpose, without fee, subject to the following restrictions:

  1. The origin of this source code must not be misrepresented.
  2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source.
  3. This Copyright notice may not be removed or altered from any source or altered source distribution.

The copyright holders and contributing author(s) specifically permit, without fee, and encourage the use of this source code as a component for supporting the Hypertext Markup Language in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated.

Afficher le fichier Open project: r1pper/TidyNetPortable

Méthodes publiques

Méthode Description
HtmlTidy ( ) : System.IO
Parse ( Stream input, TidyMessageCollection messages = null ) : string
Parse ( string input, TidyMessageCollection messages = null ) : string
Parse ( Stream input, Stream output, TidyMessageCollection messages = null ) : void

Parses the input stream and writes to the output.

Parse ( string input, Stream output, TidyMessageCollection messages = null ) : void
ParseXml ( Stream input, TidyMessageCollection messages = null ) : System.Xml.Linq.XElement

Private Methods

Méthode Description
CreateEmptyDocument ( ) : IDocument

Creates an empty DOM Document.

ParseDom ( Stream input, Stream output, TidyMessageCollection messages ) : IDocument

Parses InputStream in and returns a DOM Document node. If out is non-null, pretty prints to OutputStream out.

ParseInternal ( Stream input, Stream output, TidyMessageCollection messages ) : Node

Internal routine that actually does the parsing. The caller can pass either an InputStream or file name. If both are passed, the file name is preferred.

PrettyPrint ( IDocument doc, Stream output ) : void

Pretty-prints a DOM Document.

Method Details

HtmlTidy() public méthode

public HtmlTidy ( ) : System.IO
Résultat System.IO

Parse() public méthode

public Parse ( Stream input, TidyMessageCollection messages = null ) : string
input System.IO.Stream
messages TidyMessageCollection
Résultat string

Parse() public méthode

public Parse ( string input, TidyMessageCollection messages = null ) : string
input string
messages TidyMessageCollection
Résultat string

Parse() public méthode

Parses the input stream and writes to the output.
public Parse ( Stream input, Stream output, TidyMessageCollection messages = null ) : void
input System.IO.Stream The input stream
output System.IO.Stream The output stream
messages TidyMessageCollection The messages
Résultat void

Parse() public méthode

public Parse ( string input, Stream output, TidyMessageCollection messages = null ) : void
input string
output System.IO.Stream
messages TidyMessageCollection
Résultat void

ParseXml() public méthode

public ParseXml ( Stream input, TidyMessageCollection messages = null ) : System.Xml.Linq.XElement
input System.IO.Stream
messages TidyMessageCollection
Résultat System.Xml.Linq.XElement