Creates a Splitter over XmlEvents using the given matcher to determine where sub-streams start and end. For example, Splitter.xml(* \ "foo") when applied to the xml:
Creates a Splitter over XmlEvents using the given matcher to determine where sub-streams start and end. For example, Splitter.xml(* \ "foo") when applied to the xml:
would identify the first and second <foo> elements as separate substreams, containing the events ElemStart(foo), Text(hello), ElemEnd(foo) and ElemStart(foo), Text(goodbye), ElemEnd(foo) respectively.
Any context matched by the matcher will be passed to the "joiner" functions, e.g. flatMap and map.
Type parameters
C
The context type returned by the matcher
Value parameters
matcher
A ContextMatcher used to identify where each sub-stream begins and ends, and extracts some context value to identify each sub-stream.
pos
Used to construct a SpacFrameElement if a parser constructed from this splitter fails
Attributes
Returns
A new Splitter that splits the source into sub-streams identified by the matcher