Slow group - noob Xml question - converting binary structure to Xml and back?
-
First time I have to do this. I know, where have I been the last 10 years... Given a structure: struct { int A; int B; another_struct aStruct; float fValue; } my_binary_data; What is the best practice way to dump this in Xml format as well as read it? We're using rapidXml on this project, and what I've seen in existing code is line after line of sprint operations to format and then insert each tagged value into the Xml file. Pretty much the same thing trying to read the Xml back in. My concern is that some of my structures are going to be changing day by day, and keeping the conversion code up to data is going to be tedious. Anyone have a better way to do this, or is this just the nature of the beast?
Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
First time I have to do this. I know, where have I been the last 10 years... Given a structure: struct { int A; int B; another_struct aStruct; float fValue; } my_binary_data; What is the best practice way to dump this in Xml format as well as read it? We're using rapidXml on this project, and what I've seen in existing code is line after line of sprint operations to format and then insert each tagged value into the Xml file. Pretty much the same thing trying to read the Xml back in. My concern is that some of my structures are going to be changing day by day, and keeping the conversion code up to data is going to be tedious. Anyone have a better way to do this, or is this just the nature of the beast?
Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
Since XML is text based you have very little choice. Perhaps you need to investigate whether XML is the optimum solution to your problem.
Use the best guess
Appreciate the feedback. As in many projects, some things are being decided by other people. I'm just trying to get a handle on what to expect. If it has to be done this way, it has to be done this way :). Past projects have exchanged data between devices using binary. This has disadvantages - byte swapping issues, messages tied to data structures, etc.
Charlie Gilley You're going to tell me what I want to know, or I'm going to beat you to death in your own house. "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759