How do I create an object from parsing FIX XML data in C++? -
the xml below represents fix message. message has variable number of fields (numbered using id tag), each containing differing attributes. parse xml , additional coding abilities output c++ message object includes attribute information per field.
first question be- there boost library can use this? second question interface between xml parser can provide , have write code create objects. example, in xml on line 8 there <delta/>
tag , attribute of object. field 52 (line 8) attribute delta sub type object line 9 attribute copy subtype object. store these subtypes in std::unordered_map
field id being key.
i guess way of wording is- "end result" xml parser give me build objects way want them?
you should use 1 of many commonly-used xml parsers, xerces , tinyxml 2 possibilities. there more. google friend.
you want run in sax mode rather dom mode (the documentation parser choose explain). means parser call code supply each element , attribute parses rather building arbitrary structure in memory doesn't match domain-specific needs.
Comments
Post a Comment