Specialization of ContextMatcher which only checks the first element in the stack for matching operations.
Specialization of ContextMatcher which only checks the first element in the stack for matching operations. Transformation operations on single-element matchers will yield other single-element matchers (rather than the base ContextMatcher type). Combination operations involving other single-element matchers will also yield single-element matchers. SingleElementContextMatchers form the building blocks of more complex matchers.
The type of the matched context.
Context matcher that matches any single element at the head of the tag stack.
Context matcher that matches any single element at the head of the tag stack.
Defines XML-specific conveniences for creating ContextMatchers
.
Defines XML-specific conveniences for creating ContextMatchers
.
The contents of ContextMatcherSyntax
are inherited by this package object, so you
can choose to import them along with all of the other "syntax" helpers
by importing io.dylemma.spac.xml._
, or import the Implicits
specifically
via io.dylemma.spac.xml.ContextMatcherSyntax._
.
Defines XML-specific instances for the core spac typeclasses.
Defines XML-specific instances for the core spac typeclasses.
The contents of Implicits
are inherited by this package object, so you
can choose to import them along with all of the other "syntax" helpers
by importing io.dylemma.spac.xml._
, or import the Implicits
specifically
via io.dylemma.spac.xml.Implicits._
.
Context matcher that always matches without consuming any of the tag stack.
Context matcher that always matches without consuming any of the tag stack.
Context matcher that extracts the given attribute from the element at the head of the stack.
Context matcher that extracts the given attribute from the element at the head of the stack.
The local name of the attribute to extract
Context matcher that extracts the given attribute from the element at the head of the stack.
Context matcher that extracts the given attribute from the element at the head of the stack.
The qualified name of the attribute to extract
Implicit evidence that an XMLEvents
instance can be opened as a stream of XMLEvent
.
Implicit evidence that an XMLEvents
instance can be opened as a stream of XMLEvent
.
Implicit evidence that any value of type T
can be opened as a stream of XMLEvent
as long as T belongs to the XMLResource typeclass.
Implicit evidence that any value of type T
can be opened as a stream of XMLEvent
as long as T belongs to the XMLResource typeclass.
A resource type that can be treated as a stream
Implicit evidence that T
can be opened as a stream of XMLEvent
Context matcher that matches the element at the head of the stack
as long as its name (local part only) is equal to the given name
Context matcher that matches the element at the head of the stack
as long as its name (local part only) is equal to the given name
The required (local) name for the element at the head of the stack
Context matcher that matches the element at the head of the stack
as long as its name is equal to the given qname
.
Context matcher that matches the element at the head of the stack
as long as its name is equal to the given qname
.
The required name (QName) for the element at the head of the stack
Context matcher that extracts the (local) name of the element at the head of the stack.
Context matcher that extracts the (local) name of the element at the head of the stack.
Context matcher that extracts the (qualified) name of the element at the head of the stack.
Context matcher that extracts the (qualified) name of the element at the head of the stack.
Implicitly convert a QName
to an elem
matcher
Implicitly convert a QName
to an elem
matcher
Implicitly convert a String
to an elem
matcher
Implicitly convert a String
to an elem
matcher
A io.dylemma.spac.types.Stackable
instance for XML, using XMLEvent
as the input type, and StartElement
as the context stack element type.
A io.dylemma.spac.types.Stackable
instance for XML, using XMLEvent
as the input type, and StartElement
as the context stack element type.
xml-spac
uses classes fromjavax.xml.stream.events
to create parsing logic for XML.The fundamental building blocks of an XML parser in
xml-spac
areio.dylemma.spac.xml.XMLParser.forText
for gathering text content from XML elementsio.dylemma.spac.xml.XMLParser.forMandatoryAttribute
io.dylemma.spac.xml.XMLParser.forOptionalAttribute
for gathering optional attributes from XML elementsio.dylemma.spac.xml.SingleElementContextMatcher
for building context matchers based on the XML element stackThere are several required implicits and optional conveniences included in this package object. You can access all of them at once via
import io.dylemma.spac.xml._
or import them individually via
The imported conveniences provide methods like
ContextMatcherSyntax.elem
for matching elements by nameContextMatcherSyntax.attr
for extracting element attributes as contextContextMatcherSyntax.*
andContextMatcherSyntax.**
as wildcards for element matching