An introduction to Xtract
summary
Xtract is a small Scala library that turns XML into Scala objects and is proven by importing IDML (InDesign) into Lucidpress JSON. It provides an XPath-like path type, a composable XMLReader that returns ParsedResult values of success / failure / partial success, built-in readers for Int/Boolean/Option/Seq, implicit companion-object lookup, recover/defaults, lazy recursion, and is published on GitHub and Maven Central with plans to port combinators to Cats.
AI-written summary · about
chapters (11)
- 0:00Start
- 0:38Background
- 1:24First Attempt
- 2:02There are a few problems
- 3:45The pieces of Xtract
- 6:56ParseResult
- 7:59XmlReader
- 8:57Sample XML
- 18:26PartialParseSuccess
- 19:02The Future
- 19:42References
related talks
09mScala Parser Combinators: The Easier Way to Create an External DSL
46mEverything You Always Wanted to Know About Pattern Matching
31mCool toolz in the Scalaz and Cats toolboxes
34mDelimited dependently
17mFetch: Simple & Efficient data access
26mEssential Functional Structures: Functor, Applicative and Traverse
42mExtract information accurately from documents using computer vision
45mOh, All the things you'll traverse
