HTMLchunk Members

Majestic12

High-performance .NET C# HTMLparser Library

HTMLchunk Members

HTMLchunk overview

Public Static Methods

MakeSafeParamValue Makes parameter value safe to be used in param - this will check for any conflicting quote chars, but not full entity-encoding

Public Instance Constructors

HTMLchunk Constructor Initialises new HTMLchunk

Public Instance Fields

bHashMode If true then tag params will be kept in a hash rather than in a fixed size arrays. This will be slow down parsing, but make it easier to use.
cParamChars Character used to quote param's value: it is taken actually from parsed HTML
iChunkLength Length of the chunk in bHTML data array
iChunkOffset Offset in bHTML data array at which this chunk starts
iParams Number of parameters and values stored in sParams array, OR in oParams hashtable if bHashMode is true
oEnc Encoder to be used for conversion of binary data into strings, Encoding.Default is used by default, but it can be changed if top level user of the parser detects that encoding was different
oHTML For TAGS: it stores raw HTML that was parsed to generate thus chunk will be here UNLESS HTMLparser was configured not to store it there as it can improve performance For TEXT or COMMENTS: actual text or comments - you MUST call Finalise(); first.
oParams Hashtable with tag parameters: keys are param names and values are param values. ONLY used if bHashMode is set to TRUE.
oType Chunk type showing whether its text, open or close tag, comments or script. WARNING: if type is comments or script then you have to manually call Finalise(); method in order to have actual text of comments/scripts in oHTML variable
sParams Param names will be stored here - actual number is in iParams. ONLY used if bHashMode is set to FALSE.
sTag If its open/close tag type then this is where lowercased Tag will be kept
sValues Param values will be stored here - actual number is in iParams. ONLY used if bHashMode is set to FALSE.

Public Instance Methods

AddParam Adds tag parameter to the chunk
Clear Clears chunk preparing it for
ConvertParamsToHash This function will convert parameters stored in sParams/sValues arrays into oParams hash Useful if generally parsing is done when bHashMode is FALSE. Hash operations are not the fastest, so its best not to use this function.
Dispose 
Equals (inherited from Object) Determines whether the specified Object is equal to the current Object.
GenerateHTML Generates HTML based on current chunk's data Note: this is not a high performance method and if you want ORIGINAL HTML that was parsed to create this chunk then use relevant HTMLparser method to obtain such HTML
GenerateParamHTML Generates HTML for param/value pair
GenerateParamsHTML Generates HTML for params in this chunk
GetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
GetParamValue Returns value of a parameter
GetType (inherited from Object) Gets the Type of the current instance.
SetEncoding Sets encoding to be used for conversion of binary data into string
ToString (inherited from Object) Returns a String that represents the current Object.

Protected Instance Methods

Finalize (inherited from Object) Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

HTMLchunk Class | Majestic12 Namespace