View Source xmerl_eventp (xmerl v1.4)

Simple event-based front-ends to xmerl_scan for processing of XML documents in streams and for parsing in SAX style. Each contain more elaborate settings of xmerl_scan that makes usage of the customization functions.

Summary

Functions

Parse file containing an XML document, SAX style. Wrapper for a call to the XML parser xmerl_scan with a hook_fun for using xmerl export functionality directly after an entity is parsed.

Parse file containing an XML document as a stream, DOM style. Wrapper for a call to the XML parser xmerl_scan with a continuation_fun for handling streams of XML data. Note that the continuation_fun, acc_fun, fetch_fun, rules and close_fun options cannot be user defined using this parser.

Parse file containing an XML document as a stream, SAX style. Wrapper for a call to the XML parser xmerl_scan with a continuation_fun for handling streams of XML data. Note that the continuation_fun, acc_fun, fetch_fun, rules, hook_fun, close_fun and user_state options cannot be user defined using this parser.

Parse file containing an XML document, SAX style. Wrapper for a call to the XML parser xmerl_scan with a hook_fun for using xmerl export functionality directly after an entity is parsed.

Types

Link to this type

option_list()

View Source (not exported)
-type option_list() :: [{atom(), term()}].
Link to this type

xmlElement()

View Source (not exported)
-type xmlElement() ::
    #xmlElement{name :: term(),
                expanded_name :: term(),
                nsinfo :: term(),
                namespace :: term(),
                parents :: term(),
                pos :: term(),
                attributes :: term(),
                content :: term(),
                language :: term(),
                xmlbase :: term(),
                elementdef :: term()}.

Functions

Link to this function

file_sax(Fname,CallBack,UserState,Options)

View Source

Parse file containing an XML document, SAX style. Wrapper for a call to the XML parser xmerl_scan with a hook_fun for using xmerl export functionality directly after an entity is parsed.

-spec stream(Fname :: string(), Options :: option_list()) ->
          {xmlElement(), list()} | {error, Reason :: term()}.

Parse file containing an XML document as a stream, DOM style. Wrapper for a call to the XML parser xmerl_scan with a continuation_fun for handling streams of XML data. Note that the continuation_fun, acc_fun, fetch_fun, rules and close_fun options cannot be user defined using this parser.

Link to this function

stream_sax(Fname,CallBack,UserState,Options)

View Source

Parse file containing an XML document as a stream, SAX style. Wrapper for a call to the XML parser xmerl_scan with a continuation_fun for handling streams of XML data. Note that the continuation_fun, acc_fun, fetch_fun, rules, hook_fun, close_fun and user_state options cannot be user defined using this parser.

Link to this function

string_sax(String,CallBack,UserState,Options)

View Source

Parse file containing an XML document, SAX style. Wrapper for a call to the XML parser xmerl_scan with a hook_fun for using xmerl export functionality directly after an entity is parsed.