-module( xml_input ). -export( [task/0] ). -include_lib("xmerl/include/xmerl.hrl"). task() -> {XML, []} = xmerl_scan:string( xml(), [{encoding, "iso-10646-utf-1"}] ), Attributes = lists:flatten( [X || #xmlElement{name='Student', attributes=X} <- XML#xmlElement.content] ), [io:fwrite("~s~n", [X]) || #xmlAttribute{name='Name', value=X} <- Attributes]. xml() -> " ".