let table_of_xml = function
    Xml.Element
      ("li",_,
       [Xml.Element("table",_,
                [Xml.Element ("ta_name",_,[Xml.PCData name]);
                  Xml.Element ("ta_comment",_,[Xml.PCData comment]);
                  Xml.Element ("ta_columns",_,[Xml.Element("list",_,cols)]);
                  Xml.Element ("ta_atts",_,[Xml.Element("list",_,atts)]);
                  Xml.Element ("ta_indexes",_,[Xml.Element("list",_,indexes)]);
                  Xml.Element ("ta_logged",_,[logged]);
                ] )
       ]
      ) ->
        let columns = List.map column_of_xml cols in
        { ta_name = unescape name ;
          ta_comment = unescape comment ;
          ta_columns = columns ;
          ta_atts = [] ;
          ta_indexes = [] ;
          ta_logged = bool_of_xml logged ;
        }
  | e -> fail e "table_of_xml"