abstract datatype: global_state()
The global state of the scanner, represented by the #xmerl_scanner{} record.
abstract datatype: option_list()
Options allows to customize the behaviour of the scanner. See also tutorial on customization functions.
Possible options are:{acc_fun, Fun}
{continuation_fun, Fun} |
{continuation_fun, Fun, ContinuationState}
{event_fun, Fun} |
{event_fun, Fun, EventState}
{fetch_fun, Fun} |
{fetch_fun, Fun, FetchState}
{hook_fun, Fun} |
{hook_fun, Fun, HookState}
{close_fun, Fun}
{rules, ReadFun, WriteFun, RulesState} |
{rules, Rules}
{user_state, UserState}
{fetch_path, PathList}
{prolog, Flag}
{space, Flag}
{line, Line}
{namespace_conformant, Flag}
{validation, Flag}
{quiet, Flag}
{doctype_DTD, DTD}
Exported Functions | |
---|---|
accumulate_whitespace/4 | Function to accumulate and normalize whitespace. |
cont_state/1 | See cont_state/2. |
cont_state/2 | For controlling the ContinuationState, to be used in a continuation function, and called when the parser encounters the end of the byte stream. |
event_state/1 | See event_state/2. |
event_state/2 | For controlling the EventState, to be used in an event function, and called at the beginning and at the end of a parsed entity. |
fetch_state/1 | See fetch_state/2. |
fetch_state/2 | For controlling the FetchState, to be used in a fetch function, and called when the parser fetch an external resource (eg. |
file/1 | See file/2. |
file/2 | Parse file containing an XML document. |
hook_state/1 | See hook_state/2. |
hook_state/2 | For controlling the HookState, to be used in a hook function, and called when the parser has parsed a complete entity. |
rules_state/1 | See rules_state/2. |
rules_state/2 | For controlling the RulesState, to be used in a rules function, and called when the parser store scanner information in a rules database. |
string/1 | See string/2. |
string/2 | Parse string containing an XML document. |
user_state/1 | See user_state/2. |
user_state/2 | For controlling the UserState, to be used in a user function. |
accumulate_whitespace(T::string(), S::global_state(), atom(), Acc::string()) -> {Acc, T1, S1}
Function to accumulate and normalize whitespace.
cont_state(S::global_state()) -> global_state()
Equivalent to cont_state(ContinuationState, S) .
cont_state(ContinuationState, S::global_state()) -> global_state()
For controlling the ContinuationState, to be used in a continuation function, and called when the parser encounters the end of the byte stream. See tutorial on customization functions.
event_state(S::global_state()) -> global_state()
Equivalent to event_state(EventState, S) .
event_state(EventState, S::global_state()) -> global_state()
For controlling the EventState, to be used in an event function, and called at the beginning and at the end of a parsed entity. See tutorial on customization functions.
fetch_state(S::global_state()) -> global_state()
Equivalent to fetch_state(FetchState, S) .
fetch_state(FetchState, S::global_state()) -> global_state()
For controlling the FetchState, to be used in a fetch function, and called when the parser fetch an external resource (eg. a DTD). See tutorial on customization functions.
file(Filename::string()) -> xmlElement()
Equivalent to file(Name, []) .
file(Filename::string(), Options::option_list()) -> xmlElement()
Parse file containing an XML document
hook_state(S::global_state()) -> global_state()
Equivalent to hook_state(HookState, S) .
hook_state(HookState, S::global_state()) -> global_state()
For controlling the HookState, to be used in a hook function, and called when the parser has parsed a complete entity. See tutorial on customization functions.
rules_state(S::global_state()) -> global_state()
Equivalent to rules_state(RulesState, S) .
rules_state(RulesState, S::global_state()) -> global_state()
For controlling the RulesState, to be used in a rules function, and called when the parser store scanner information in a rules database. See tutorial on customization functions.
string(Text::list()) -> xmlElement()
Equivalent to string(Test, []) .
string(Text::list(), Options::option_list()) -> xmlElement()
Parse string containing an XML document
user_state(S::global_state()) -> global_state()
Equivalent to user_state(UserState, S) .
user_state(UserState, S::global_state()) -> global_state()
For controlling the UserState, to be used in a user function. See tutorial on customization functions.