xml2struct is a tool which generates xml serialization code  automatically based on struct defines， it use lex&yacc to parse struct defines and generate xml serialization code based on ctemplate and tinyxml,total of source code is less than 1000 lines.