Exml (exml v0.1.3)
This module provides a simple interface to parse XML documents and provide XPath access to the document.
The module provides two functions:
parse/{1,2}
parses an XML document and returns a document tree.get/2
provides XPath access to the document.
Example:
xml = "<book><title>The Giver</title><author>John Grisham</author></book>"
doc = Exml.parse xml
Exml.get doc, "//book/title"
# => "The Giver"
Link to this section Summary
Functions
Get the value of an XML attribute using XPath from a document tree
Parse XML and return a document tree
Link to this section Functions
Link to this function
get(node, path)
Get the value of an XML attribute using XPath from a document tree
Link to this function
parse(xml_string, options \\ [quiet: true])
Parse XML and return a document tree