#include <wx/html/htmlpars.h>
Classes wxHtmlParser::Parse method.
Constructor.).
This must be called after DoParsing().
Parses the m_Source from begin_pos to end_pos - 1.
Parses the whole m_Source.
Returns product of parsing.
Returned value is result of parsing of the document.
The type of this result depends on internal representation in derived parser (but it must be derived from wxObject!). See wxHtmlWinParser for details.
Returns pointer to the source being parsed.
Setups the parser for parsing the source string.
(Should be overridden in derived class).
Proceeds parsing of the document.
This is end-user method. You can simply call it when you need to obtain parsed output (which is parser-specific).
The method does these things:
You shouldn't use InitParser(), DoParsing(), GetProduct() or DoneParser() directly.
Restores parser's state before last call to PushTagHandler().
Forces the handler to handle additional tags (not returned by wxHtmlTagHandler::GetSupportedTags).
The handler should already be added to this parser.
Example:
Imagine you want to parse following pseudo-html structure:
It is obvious that you cannot use only one tag handler for <param> tag. Instead you must use context-sensitive handlers for <param> inside <myitems> and <param> inside <execute>. This is the preferred solution: