[erlang-questions] xmerl SAX interface
Willem de Jong
Mon Feb 5 19:55:59 CET 2007
I tried to find this out as well, but I didn't find the answer either.
I ended up implementing my own SAX parser. It is part of Erlsom (which
you can find on Sourceforge).
Your example could be parsed as follows.
S = "<e1 xmlns='urn'>
C = fun(Event, State) ->
erlsom:sax(S, , C).
On 2/5/07, Ladislav Lenart <lenartlad@REDACTED> wrote:
> I am trying to implement a XML SAX driver using xmerl and I got lost
> on the way a little. xmerl_eventp seems that it is what I am looking
> for (SAX driver), but when I try to parse the following
> <e1 xmlns='urn'>
> <e2 a2='b'>2</e2>
> I get only the "closing" events which is not what I would expect
> (from a SAX driver).
> I have read the examples in xmerl 0.20 and used Google extensively,
> but with no luck so far.
> Can anyone please show me how to set up and SAX-parse a simple XML
> document like the one above (namespaces are not necessary but would
> be great, too).
> Links to xmerl tutorials/faqs/... are also welcome.
> Thanks in advance,
> Ladislav Lenart
> erlang-questions mailing list
More information about the erlang-questions