Package

io.dylemma.spac

xml

Permalink

package 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

There 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

Source
package.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. xml
  2. Implicits
  3. ContextMatcherSyntax
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait SingleElementContextMatcher[+A] extends ContextMatcher[StartElement, A]

    Permalink

    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.

    A

    The type of the matched context.

  2. type XMLContextMatcher[+Context] = ContextMatcher[StartElement, Context]

    Permalink
  3. class XMLEvents extends AnyRef

    Permalink
  4. type XMLParser[+T] = Parser[XMLEvent, T]

    Permalink
  5. trait XMLResource[-T] extends AnyRef

    Permalink
  6. class XMLSplitter[+Context] extends ContextStackSplitter[XMLEvent, StartElement, Context]

    Permalink
  7. type XMLTransformer[+T] = Transformer[XMLEvent, T]

    Permalink

Value Members

  1. val *: SingleElementContextMatcher[Unit]

    Permalink

    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.

    Definition Classes
    ContextMatcherSyntax
  2. val **: ContextMatcher[StartElement, Unit]

    Permalink
    Definition Classes
    ContextMatcherSyntax
  3. object ContextMatcherSyntax extends ContextMatcherSyntax

    Permalink

    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._.

  4. object Implicits extends Implicits

    Permalink

    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._.

  5. val Root: ContextMatcher[StartElement, Unit]

    Permalink

    Context matcher that always matches without consuming any of the tag stack.

    Context matcher that always matches without consuming any of the tag stack.

    Definition Classes
    ContextMatcherSyntax
  6. object SingleElementContextMatcher

    Permalink
  7. object XMLEvents

    Permalink
  8. object XMLParser

    Permalink
  9. object XMLResource

    Permalink
  10. object XMLSplitter

    Permalink
  11. def attr(name: String): SingleElementContextMatcher[String]

    Permalink

    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.

    name

    The local name of the attribute to extract

    Definition Classes
    ContextMatcherSyntax
  12. def attr(qname: QName): SingleElementContextMatcher[String]

    Permalink

    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.

    qname

    The qualified name of the attribute to extract

    Definition Classes
    ContextMatcherSyntax
  13. implicit val consumableLikeXMLEvents: ConsumableLike[XMLEvents, XMLEvent]

    Permalink

    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.

    Definition Classes
    Implicits
  14. implicit def consumableLikeXMLResource[T](implicit arg0: XMLResource[T]): ConsumableLike[T, XMLEvent]

    Permalink

    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.

    T

    A resource type that can be treated as a stream

    returns

    Implicit evidence that T can be opened as a stream of XMLEvent

    Definition Classes
    Implicits
  15. def elem(name: String): SingleElementContextMatcher[Unit]

    Permalink

    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

    name

    The required (local) name for the element at the head of the stack

    Definition Classes
    ContextMatcherSyntax
  16. def elem(qname: QName): SingleElementContextMatcher[Unit]

    Permalink

    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.

    qname

    The required name (QName) for the element at the head of the stack

    Definition Classes
    ContextMatcherSyntax
  17. val extractElemName: SingleElementContextMatcher[String]

    Permalink

    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.

    Definition Classes
    ContextMatcherSyntax
  18. val extractElemQName: SingleElementContextMatcher[QName]

    Permalink

    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.

    Definition Classes
    ContextMatcherSyntax
  19. package handlers

    Permalink
  20. implicit def qnameToElemMatcher(qname: QName): SingleElementContextMatcher[Unit]

    Permalink

    Implicitly convert a QName to an elem matcher

    Implicitly convert a QName to an elem matcher

    Definition Classes
    ContextMatcherSyntax
  21. implicit def stringToElemMatcher(name: String): SingleElementContextMatcher[Unit]

    Permalink

    Implicitly convert a String to an elem matcher

    Implicitly convert a String to an elem matcher

    Definition Classes
    ContextMatcherSyntax
  22. package syntax

    Permalink
  23. implicit val xmlStackable: Aux[XMLEvent, StartElement]

    Permalink

    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.

    Definition Classes
    Implicits

Inherited from Implicits

Inherited from ContextMatcherSyntax

Inherited from AnyRef

Inherited from Any

Ungrouped