flowtick / xmls   0.1.11

Apache License 2.0 GitHub

simple xml parser lib for Scala

Scala versions: 2.13 2.12 2.11
Scala.js versions: 1.x 0.6

xmls

travis latest release for 2.13

A simple xml parser for Scala(.js) based on parboiled2.

Why?

While scala-xml supports Scala.js now, the loading of XML is still relying on the JVM parser implementations. xmls aims to provide a good enough XML parser for usage in cross-platform builds (web-only applications could just use the XML parsing of the browser).

See the spec for supported XML elements.

Non-Goals

  • A XML complete parser
  • XSD validation

Build

sbt package

Use

import xmls._

val parsed: Either[XmlParserError, scala.xml.Node] = XMLS.parse("<root><child/><child/></root>")

see dist/example.html for usage in the browser.

License

Apache License Version 2.0, see LICENSE