[erlang-questions] undocumented xmerl_scan acc_fun feature

hroe@REDACTED hroe@REDACTED
Fri Aug 8 23:21:20 CEST 2008


Hi,
while experimenting on how to use xmerl, I noticed in
http://www.erlang.org/doc/apps/xmerl/xmerl_examples.html
a useful feature.

    Acc = fun(#xmlText{value = " ", pos = P}, Acc, S) ->
		  {Acc, P, S};  % new return format

The accumulator returns a triplet including pos = P, which is  not documented.
It has as effect that the pos = P value is used for the next item parsed from the data.

Hth, Herman



More information about the erlang-questions mailing list