C# Class Gumbo.GumboOptions

Datei anzeigen Open project: rgripper/GumboBindings Class Usage Examples

Public Properties

Property Type Description
fragment_context GumboTag
fragment_namespace GumboNamespaceEnum
max_errors int
stop_on_first_error bool
tab_stop int

Property Details

fragment_context public_oe property

The fragment context for parsing: https://html.spec.whatwg.org/multipage/syntax.html#parsing-html-fragments If GUMBO_TAG_LAST is passed here, it is assumed to be "no fragment", i.e. the regular parsing algorithm. Otherwise, pass the tag enum for the intended parent of the parsed fragment. We use just the tag enum rather than a full node because that's enough to set all the parsing context we need, and it provides some additional flexibility for client code to act as if parsing a fragment even when a full HTML tree isn't available. Default: GUMBO_TAG_LAST
public GumboTag fragment_context
return GumboTag

fragment_namespace public_oe property

The namespace for the fragment context. This lets client code differentiate between, say, parsing a <title> tag in SVG vs. parsing it in HTML. Default: GUMBO_NAMESPACE_HTML
public GumboNamespaceEnum fragment_namespace
return GumboNamespaceEnum

max_errors public_oe property

The maximum number of errors before the parser stops recording them. This is provided so that if the page is totally borked, we don't completely fill up the errors vector and exhaust memory with useless redundant errors. Set to -1 to disable the limit. Default: -1
public int max_errors
return int

stop_on_first_error public_oe property

Whether or not to stop parsing when the first error is encountered. Default: false.
public bool stop_on_first_error
return bool

tab_stop public_oe property

The tab-stop size, for computing positions in source code that uses tabs. Default: 8.
public int tab_stop
return int