% Example xml: <?xml version="1.0" encoding="UTF-8" ?> <root id="1"> <ele id="2"/> <ele id="3">vvv\nxxx\n</ele> </root> # Usage example 1> xmltree:file(L). {root,[{id,<<"1">>}], [{ele,[{id,<<"2">>}],[]}, {ele,[{id,<<"3">>}],<<"vvv\nxxx\n">>}]} 2> Rules = {root, [{id,integer}], [{ele, [{id,integer}], string}]}, 2> xmltree:string(L, Rules). {root,[{id,1}], [{ele,[{id,2}],[]},{ele,[{id,3}],"vvv\nxxx\n"}]}
Authors: Serge Aleynikov (saleyn@gmail.com).
% Example xml: <?xml version="1.0" encoding="UTF-8" ?> <root id="1"> <ele id="2"/> <ele id="3">vvv\nxxx\n</ele> </root> # Usage example 1> xmltree:file(L). {root,[{id,<<"1">>}], [{ele,[{id,<<"2">>}],[]}, {ele,[{id,<<"3">>}],<<"vvv\nxxx\n">>}]} 2> Rules = {root, [{id,integer}], [{ele, [{id,integer}], string}]}, 2> xmltree:string(L, Rules). {root,[{id,1}], [{ele,[{id,2}],[]},{ele,[{id,3}],"vvv\nxxx\n"}]}
file/1 | |
file/2 | |
string/1 | |
string/2 | |
xml/1 | |
xml/2 |
file(Filename) -> any()
file(Filename, RulesFile) -> any()
string(XmlS) -> any()
string(XmlS, Rules) -> any()
xml(XmlElement) -> any()
xml(XmlElement, ChildRules) -> any()
Generated by EDoc