Use the ~x Sigil for XPath
masterThe ~x sigil allows you to define XPath 1.0 paths. Warning: Because SweetXml uses xmerl internally, only XPath 1.0 paths are supported.
If you do not import SweetXml, you must use the %SweetXpath{} struct instead of the sigil.
# Using the sigil after importing
import SweetXml
~x"//some/path"
# Using the struct without importing
%SweetXpath{path: '//some/path', is_value: false, is_list: false, cast_to: false}