let column_of_xml = function
Xml.Element
("li",_,
[Xml.Element("column",_,
[Xml.Element ("col_name",_,[Xml.PCData name]);
Xml.Element ("col_comment",_,[Xml.PCData comment]);
Xml.Element ("col_type_ml",_,[Xml.PCData type_ml]);
Xml.Element ("col_nullable",_,[nullable]);
Xml.Element ("col_index",_,[index]);
Xml.Element ("col_dbms",_,[Xml.Element("list",_,dbms)]);
]
)
]
) ->
let dbms = List.map dbms_of_xml dbms in
{ col_name = unescape name ;
col_comment = unescape comment ;
col_type_ml = unescape type_ml ;
col_nullable = bool_of_xml nullable ;
col_index = bool_of_xml index ;
col_dbms = dbms ;
}
| e -> fail e "column_of_xml"