encoding/xml/koala: introduce the first experimental XML encoder
This is the initial implementation of the Koala XML encoding
as described at https://cuelang.org/discussion/3776.
In short, this encoding is inspired by BadgerFish, an XML to JSON
translation where XML element attributes and bodies become JSON object
key-value pairs with "$" prefixes. We do something very similar
in the XML "Koala" encoding, but adapting the logic to fit CUE better.
Here we introduce the decoding side only; the encoding side will come
as a separate change at a later time.
See #3776.
Signed-off-by: Matthew Sladescu <msladescu@microsoft.com>
Change-Id: If2292c95289fc0229321b7737249dd6057556b03
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1211362
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Chief Cueckoo <chief.cueckoo@cue.works>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
authored by