xml-spac
uses classes from javax.xml.stream.events
to create parsing logic for XML.
xml-spac
uses classes from javax.xml.stream.events
to create parsing logic for XML.
The fundamental building blocks of an XML parser in xml-spac
are
io.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
import io.dylemma.spac.xml.Implicits._ import io.dylemma.spac.xml.ContextMatcherSyntax._
The imported conveniences provide methods like
ContextMatcherSyntax.elem
for matching elements by nameContextMatcherSyntax.attr
for extracting element attributes as contextContextMatcherSyntax.*
and ContextMatcherSyntax.**
as wildcards for element matching