xmerl_scan(3erl) | Erlang Module Definition | xmerl_scan(3erl) |
xmerl_scan - This module is the interface to the XML parser, it handles XML 1.0.
This module is the interface to the XML parser, it handles XML 1.0. The XML parser is activated through xmerl_scan:string/[1,2] or xmerl_scan:file/[1,2]. It returns records of the type defined in xmerl.hrl. See also tutorial on customization functions.
The document returned by xmerl_scan:string/[1,2] and xmerl_scan:file/[1,2]. The type of the returned record depends on the value of the document option passed to the function.
The global state of the scanner, represented by the #xmerl_scanner{} record.
Options allow to customize the behaviour of the scanner. See also tutorial on customization functions.
Possible options are:
The record definition is found in xmerl.hrl.
accumulate_whitespace(T::string(), S::global_state(),
X3::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(X::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(X::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(X::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(), Rest}
Types:
Equivalent to file(Filename, []).
file(Filename::string(), Options::option_list()) ->
{document(), Rest}
Types:
Parse file containing an XML document
hook_state(S::global_state()) -> global_state()
Equivalent to hook_state(HookState, S).
hook_state(X::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(X::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(), Rest}
Types:
Equivalent to string(Text, []).
string(Text::list(), Options::option_list()) -> {document(),
Rest}
Types:
Parse string containing an XML document
user_state(S::global_state()) -> global_state()
Equivalent to user_state(UserState, S).
user_state(X::UserState, S::global_state()) ->
global_state()
For controlling the UserState, to be used in a user function. See tutorial on customization functions.
<>
xmerl 1.3.30 |