Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - expelledboy/exml: Most simple Elixir wrapper for xmerl xpath

Most simple Elixir wrapper for xmerl xpath. Contribute to expelledboy/exml development by creating an account on GitHub.

Visit SiteGitHub - expelledboy/exml: Most simple Elixir wrapper for xmerl xpath

GitHub - expelledboy/exml: Most simple Elixir wrapper for xmerl xpath

Most simple Elixir wrapper for xmerl xpath. Contribute to expelledboy/exml development by creating an account on GitHub.

Powered by 0x5a.live ๐Ÿ’—

Exml

Elixir CI Hex.pm Hex.pm

Add to mix.exs

  defp deps() do
    [
      {:exml, "~> 0.1.3"}
    ]
  end

Basic usage

xml = """
<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
    <book>
        <title lang="en">Harry Potter</title>
        <price>29.99</price>
    </book>
    <book>
        <title lang="en">Learning XML</title>
        <price>39.95</price>
    </book>
</bookstore> 
"""

doc = Exml.parse xml

Exml.get doc, "//book[1]/title/@lang"
#=> "en"

Exml.get doc, "//title"
#=> ["Harry Potter", "Learning XML"]

See w3schools for details about xpath!

Elixir Resources

are all listed below.

Resources

listed to get explored on!!

Made with โค๏ธ

to provide different kinds of informations and resources.