Packages

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

Package Members

  1. package handlers
  2. package syntax

Type Members

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

    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]
  3. class XMLEvents extends AnyRef
  4. type XMLParser[+T] = Parser[XMLEvent, T]
  5. trait XMLResource[-T] extends AnyRef
  6. class XMLSplitter[+Context] extends ContextStackSplitter[XMLEvent, StartElement, Context]
  7. type XMLTransformer[+T] = Transformer[XMLEvent, T]

Value Members

  1. val *: SingleElementContextMatcher[Unit]

    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]
    Definition Classes
    ContextMatcherSyntax
  3. val Root: ContextMatcher[StartElement, Unit]

    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
  4. def attr(name: String): SingleElementContextMatcher[String]

    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
  5. def attr(qname: QName): SingleElementContextMatcher[String]

    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
  6. implicit val consumableLikeXMLEvents: ConsumableLike[XMLEvents, XMLEvent]

    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
  7. implicit def consumableLikeXMLResource[T](implicit arg0: XMLResource[T]): ConsumableLike[T, 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.

    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
  8. def elem(name: String): SingleElementContextMatcher[Unit]

    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
  9. def elem(qname: QName): SingleElementContextMatcher[Unit]

    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
  10. val extractElemName: SingleElementContextMatcher[String]

    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
  11. val extractElemQName: SingleElementContextMatcher[QName]

    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
  12. implicit def qnameToElemMatcher(qname: QName): SingleElementContextMatcher[Unit]

    Implicitly convert a QName to an elem matcher

    Implicitly convert a QName to an elem matcher

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

    Implicitly convert a String to an elem matcher

    Implicitly convert a String to an elem matcher

    Definition Classes
    ContextMatcherSyntax
  14. implicit val xmlStackable: Aux[XMLEvent, StartElement]

    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
  15. object ContextMatcherSyntax extends ContextMatcherSyntax

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

  16. object Implicits extends Implicits

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

  17. object SingleElementContextMatcher
  18. object XMLEvents
  19. object XMLParser
  20. object XMLResource
  21. object XMLSplitter

Inherited from Implicits

Inherited from ContextMatcherSyntax

Inherited from AnyRef

Inherited from Any

Ungrouped