Just to advance you the documentation, I send the assertions (which will provide the documentation) for the predicate related to XML parsing (in $/library/pillow/html.pl):
:- comment(xml2terms(String,Terms), "@var{String} is a character list containing XML code and @var{Terms} is its prolog structured representation.").
:- true pred xml2terms(-string,+xmlterm) # "Translates a XML-term into the XML code it represents.". :- true pred xml2terms(+string,?xmlterm) # "Translates XML code into a structured XML-term.".
:- true prop xmlterm(T) + regtype # "@var{T} is a structured representation of XML code.".
Remember that, since PiLLoW is a package, it has to be loaded with :- use_package(pillow). An example of shell iteraction would be:
?- use_package(pillow). {Including /home/clip/Systems/ciao/library/pillow/pillow.pl {Including /home/clip/Systems/ciao/library/pillow/ops.pl } }
yes ?- set_prolog_flag(write_strings,on).
yes ?- xml2terms("<b r='1'>a</b><c p=3/>",T).
T = [env(b,[r="1"],["a"]),elem(c,[p="3"])] ? ,
1 ?- xml2terms(S,T).
S = "<b r=""1"">a</b><c p=""3""/>", T = [env(b,[r="1"],["a"]),elem(c,[p="3"])] ?
yes
//)