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
class XmlException(val error: XmlError, msg: String) extends Exception
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.

Value members

Concrete methods

def events[F[_], T](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 sensured 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 sensured to represent a (potentially empty) sequence of valid XML documents.

def namespaceResolver[F[_]](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])(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.

Concrete fields

val xmlEntities: Map[String, String]

The predefined XML character entities

The predefined XML character entities