-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GetXML implementation using antchfx/xmlquery #9031
Conversation
This PR should also update:
|
I don't understand how I am supposed to use this. With this XML, how do I retrieve the value of
|
This is an example usage for reading an RSS feed: {{ $rss := getXML "https://www.example.com/feed/" }}
{{ $items = $items | append ($rss.SelectElements "//item") }}
{{ range $items }}
<strong>{{ (.SelectElement "title").InnerText }}</strong><br />
<p>{{ (.SelectElement "description").InnerText | plainify | htmlUnescape }}</p>
{{ $link := (.SelectElement "link").InnerText }}
<a href="{{ $link }}">{{ $link }}</a><br />
<hr>
{{ end }} |
|
@vanbroup Thanks. This is very different than |
Thanks for this, The code looks good, but I'm not merging this now. I have two comments about this:
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
An XML data implementation of GetXML using https://github.com/antchfx/xmlquery
Exposing the Node type which allows users to get sub elements, attributes and use xpath filters.
Fixing #4470