Implement XML data support
authorPaul van Brouwershaven <vanbroup@users.noreply.github.com>
Thu, 2 Dec 2021 16:30:36 +0000 (17:30 +0100)
committerGitHub <noreply@github.com>
Thu, 2 Dec 2021 16:30:36 +0000 (17:30 +0100)
commit0eaaa8fee37068bfc8ecfb760f770ecc9a7af22a
tree95cf7c5ac3a7e56c0eb411a28cae5c0412a510bd
parent58adbeef88ea5c8769d12ba27eef2d89bdf575eb
Implement XML data support

Example:

```
{{ with resources.Get "https://example.com/rss.xml" | transform.Unmarshal }}
    {{ range .channel.item }}
        <strong>{{ .title | plainify | htmlUnescape }}</strong><br />
        <p>{{ .description | plainify | htmlUnescape }}</p>
        {{ $link := .link | plainify | htmlUnescape }}
        <a href="{{ $link }}">{{ $link }}</a><br />
        <hr>
    {{ end }}
{{ end }}
```

Closes #4470
12 files changed:
docs/content/en/functions/transform.Unmarshal.md
docs/content/en/templates/data-templates.md
go.mod
go.sum
hugolib/resource_chain_test.go
parser/frontmatter.go
parser/metadecoders/decoder.go
parser/metadecoders/decoder_test.go
parser/metadecoders/format.go
parser/metadecoders/format_test.go
tpl/transform/remarshal_test.go
tpl/transform/unmarshal_test.go