let get_text_input xmls =
try
match List.find (find_ele "textinput") xmls with
Element (_,atts,subs) ->
let f s =
match List.find (find_ele s) subs with
Element (_,_,[PCData s]) -> s
| _ -> raise Not_found
in
Some { ti_title = f "title" ;
ti_desc = f "description" ;
ti_name = f "name" ;
ti_link = f "link" ;
}
| _ ->
None
with
_ ->
None