https://github.com/expelledboy/exml
Most simple Elixir wrapper for xmerl xpath
https://github.com/expelledboy/exml
elixir xml-parser xpath
Last synced: 3 months ago
JSON representation
Most simple Elixir wrapper for xmerl xpath
- Host: GitHub
- URL: https://github.com/expelledboy/exml
- Owner: expelledboy
- Created: 2015-03-25T12:21:56.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-05-10T13:23:51.000Z (over 2 years ago)
- Last Synced: 2025-09-23T21:35:38.054Z (4 months ago)
- Topics: elixir, xml-parser, xpath
- Language: Elixir
- Homepage:
- Size: 23.4 KB
- Stars: 25
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Most simple Elixir wrapper for xmerl xpath. (XML)
- fucking-awesome-elixir - exml - Most simple Elixir wrapper for xmerl xpath. (XML)
- awesome-elixir - exml - Most simple Elixir wrapper for xmerl xpath. (XML)
- fucking-awesome-elixir - exml - Most simple Elixir wrapper for xmerl xpath. (XML)
README
Exml
====
[](https://github.com/expelledboy/exml/actions/workflows/ci.yml)
[](https://hex.pm/packages/exml)
[](https://hex.pm/packages/exml)
Add to mix.exs
```elixir
defp deps() do
[
{:exml, "~> 0.1.3"}
]
end
```
Basic usage
```elixir
xml = """
Harry Potter
29.99
Learning XML
39.95
"""
doc = Exml.parse xml
Exml.get doc, "//book[1]/title/@lang"
#=> "en"
Exml.get doc, "//title"
#=> ["Harry Potter", "Learning XML"]
```
See [w3schools](https://www.w3schools.com/xml/xpath_syntax.asp) for details about xpath!