fs2.data.xml

package fs2.data.xml

Type members

Classlikes

case class Attr(name: QName, value: List[XmlTexty])
case object NSCAttributesUnique extends NSError
case object NSCNoPrefixUndeclaring extends NSError
case object NSCPrefixDeclared extends NSError
sealed abstract class NSError(name: String) extends XmlError

Represents a namespace constraint as defined in the XML namespaces recommendation.

Represents a namespace constraint as defined in the XML namespaces recommendation.

case class QName(prefix: Option[String], local: String)
Companion:
object
object QName
Companion:
class
case object WFCElementTypeMatch extends WFError
case object WFCEntityDeclared extends WFError
case object WFCNoRecursion extends WFError
sealed abstract class WFError(name: String) extends XmlError

Represents a Well-formedness constraint as defined in the XML specification.

Represents a Well-formedness constraint as defined in the XML specification.

abstract class XmlError(val name: String)

All errors encountered in processing an Xml documents have a kind. These errors are unique code defined in the various normative documents and recommendations.

All errors encountered in processing an Xml documents have a kind. These errors are unique code defined in the various normative documents and recommendations.

sealed trait XmlEvent
Companion:
object
object XmlEvent
Companion:
class
case class XmlException(error: XmlError, msg: String) extends Exception
final implicit class XmlInterpolators(val sc: StringContext) extends AnyVal
case class XmlSyntax(id: String) extends XmlError

Represents a syntax error according to an XML production rule.

Represents a syntax error according to an XML production rule.

object collector

XML event stream collectors.

XML event stream collectors.

Value members

Concrete methods

def events[F[_], T](includeComments: Boolean)(implicit F: RaiseThrowable[F], T: CharLikeChunks[F, T]): (F, T) => XmlEvent

Transforms a stream of characters into a stream of XML events. Emitted tokens are guaranteed to be valid up to that point. If the streams ends without failure, the sequence of tokens is ensured to represent a (potentially empty) sequence of valid XML documents.

Transforms a stream of characters into a stream of XML events. Emitted tokens are guaranteed to be valid up to that point. If the streams ends without failure, the sequence of tokens is ensured to represent a (potentially empty) sequence of valid XML documents.

if includeComments is true, then comment events will be emitted together with the comment content.

def isNCNameChar(c: Char): Boolean
def isNCNameStart(c: Char): Boolean
def isXmlWhitespace(c: Char): Boolean
def namespaceResolver[F[_]](implicit F: MonadError[F, Throwable]): (F, XmlEvent) => XmlEvent

Resolves all prefixes in QNames. Assumes that entity and character references have been resolved already. Make stream go through referenceResolver first if you need it (not needed if you xml doesn't contain any such reference).

Resolves all prefixes in QNames. Assumes that entity and character references have been resolved already. Make stream go through referenceResolver first if you need it (not needed if you xml doesn't contain any such reference).

def normalize[F[_]]: (F, XmlEvent) => XmlEvent

Performs some event normalizations:

Performs some event normalizations:

  • group consecutive non CDATA XmlEvent.XmlStrings This can be useful to merge texts once references have been resolved. Attribute values are also normalized, so that they will end up being one single string after normalization if references have been replaced.
def referenceResolver[F[_]](entities: Map[String, String])(implicit F: MonadError[F, Throwable]): (F, XmlEvent) => XmlEvent

Resolves the character and entity references in the XML stream. Entities are already defined and validated (especially no recursion), hence the entities map contains the resolved text to replace the entity by.

Resolves the character and entity references in the XML stream. Entities are already defined and validated (especially no recursion), hence the entities map contains the resolved text to replace the entity by.

Deprecated methods

@deprecated(message = "Use `fs2.data.xml.events()` instead.", since = "fs2-data 1.4.0")
def events[F[_], T](implicit F: RaiseThrowable[F], T: CharLikeChunks[F, T]): (F, T) => XmlEvent

Transforms a stream of characters into a stream of XML events. Emitted tokens are guaranteed to be valid up to that point. If the streams ends without failure, the sequence of tokens is ensured to represent a (potentially empty) sequence of valid XML documents.

Transforms a stream of characters into a stream of XML events. Emitted tokens are guaranteed to be valid up to that point. If the streams ends without failure, the sequence of tokens is ensured to represent a (potentially empty) sequence of valid XML documents.

Deprecated
[Since version fs2-data 1.4.0] Use `fs2.data.xml.events()` instead.

Concrete fields

val ncNameChar: CharRanges
val ncNameStart: CharRanges
val xmlEntities: Map[String, String]

The predefined XML character entities

The predefined XML character entities

Implicits

Implicits

final implicit def XmlInterpolators(sc: StringContext): XmlInterpolators