XmlParserApplyOps

final implicit class XmlParserApplyOps(val parserApply: ParserApplyWithBoundInput[XmlEvent]) extends AnyVal

XML-specific Parser constructor methods, for example XmlParser.attr and XmlParser.text

class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def attr[N : AsQName](attributeName: N): XmlParser[String]

Alias for forMandatoryAttribute.

Alias for forMandatoryAttribute.

Type parameters:
N

Usually a String but can be a QName from whichever parser backend you're using

Value parameters:
attributeName

The name of the requested attribute

Returns:

A parser that extracts the given mandatory attribute from an XML element

def attrOpt[N : AsQName](attributeName: N): XmlParser[Option[String]]

Alias for forOptionalAttribute.

Alias for forOptionalAttribute.

Type parameters:
N

Usually a String but can be a QName from whichever parser backend you're using

Value parameters:
attributeName

The name of the requested attribute

Returns:

A parser that extracts the given optional attribute from an XML element

def forMandatoryAttribute[N : AsQName](attributeName: N): Parser[XmlEvent, String]

An XmlParser that extracts the requested mandatory attribute from the first ElemStart in the stream it consumes, throwing an exception if the attribute is missing or an ElemStart never appears.

An XmlParser that extracts the requested mandatory attribute from the first ElemStart in the stream it consumes, throwing an exception if the attribute is missing or an ElemStart never appears.

Type parameters:
N

Usually a String but can be a QName from whichever parser backend you're using

Value parameters:
attributeName

The name of the requested attribute

Returns:

A parser that extracts the given mandatory attribute from an XML element

def forOptionalAttribute[N : AsQName](attributeName: N): Parser[XmlEvent, Option[String]]

An XmlParser that extracts the requested optional attribute from the first ElemStart in the stream it consumes, wrapped in a Some, instead yielding a None if the attribute is missing or an ElemStart never appears.

An XmlParser that extracts the requested optional attribute from the first ElemStart in the stream it consumes, wrapped in a Some, instead yielding a None if the attribute is missing or an ElemStart never appears.

Type parameters:
N

Usually a String but can be a QName from whichever parser backend you're using

Value parameters:
attributeName

The name of the requested attribute

Returns:

A parser that extracts the given optional attribute from an XML element

def forText: Parser[XmlEvent, String]

An XmlParser that concatenates all of the raw character data found in the XmlEvent stream it consumes.

An XmlParser that concatenates all of the raw character data found in the XmlEvent stream it consumes.

Concrete fields

val parserApply: ParserApplyWithBoundInput[XmlEvent]