Click here to Skip to main content
16,013,944 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: Checking for valid XML file structure Pin
BoneSoft10-Jun-06 18:49
BoneSoft10-Jun-06 18:49 
QuestionNeed Help in XML DocType Pin
Kiran Pinjala6-Jun-06 3:10
Kiran Pinjala6-Jun-06 3:10 
QuestionUpdating the xml file in asp.net Pin
Sandeep Akhare5-Jun-06 3:41
Sandeep Akhare5-Jun-06 3:41 
AnswerRe: Updating the xml file in asp.net Pin
Sandeep Akhare7-Jun-06 23:51
Sandeep Akhare7-Jun-06 23:51 
QuestionExporting to XML Pin
Ashraj19824-Jun-06 20:23
Ashraj19824-Jun-06 20:23 
AnswerRe: Exporting to XML Pin
Stephan Samuel6-Jun-06 3:39
Stephan Samuel6-Jun-06 3:39 
QuestionSave C++ Object to XML [modified] Pin
Rudy1023-Jun-06 7:47
Rudy1023-Jun-06 7:47 
AnswerRe: Save C++ Object to XML Pin
Eran Aharonovich10-Jul-06 7:23
Eran Aharonovich10-Jul-06 7:23 
If all your class variables are structures and not classes ( I mean int, double, float unlike CString, CList ) you can save the size of each variable in the XML file and then when you read it then just go over all elements and copy them to the class at the write position.

You should also save the type of the variables.

Something like this:

<A>
<a Size="4" Type="Int32">2</a>
<b Size="4" Type="Int32">3</b>
</A>

When you want to copy the objects from the XML you'll have to convert the string to the desired type and then copy the object to the write position in the class.

something like this:

int offset= 0;
int XMLValue;
int XMLVarSize;


A obj = new A();

Foreach Node In Nodes
{
memcpy( (LPBYTE)obj + offset, &XMLValue, XMLVarSize);
offset += XMLVarSize;
}



Good luck

Eran Aharonovich (eran.aharonovich@gmail.com )
Noviway
QuestionHTML into XML Pin
Felipe Dalorzo2-Jun-06 6:49
Felipe Dalorzo2-Jun-06 6:49 
AnswerRe: HTML into XML Pin
Stephan Samuel2-Jun-06 7:37
Stephan Samuel2-Jun-06 7:37 
GeneralRe: HTML into XML Pin
led mike2-Jun-06 11:18
led mike2-Jun-06 11:18 
GeneralRe: HTML into XML Pin
Stephan Samuel2-Jun-06 11:39
Stephan Samuel2-Jun-06 11:39 
GeneralRe: HTML into XML Pin
led mike2-Jun-06 12:16
led mike2-Jun-06 12:16 
GeneralRe: HTML into XML Pin
Felipe Dalorzo4-Jun-06 4:17
Felipe Dalorzo4-Jun-06 4:17 
GeneralRe: HTML into XML Pin
Felipe Dalorzo4-Jun-06 4:16
Felipe Dalorzo4-Jun-06 4:16 
AnswerRe: HTML into XML Pin
Ed.Poore10-Jun-06 11:42
Ed.Poore10-Jun-06 11:42 
AnswerRe: HTML into XML Pin
Eran Aharonovich9-Jul-06 7:36
Eran Aharonovich9-Jul-06 7:36 
QuestionDisplaying nested children elements in DataGridView Pin
sepsep061-Jun-06 14:36
sepsep061-Jun-06 14:36 
Questioncan you tell me how to start with XML ? Pin
Mohammed Amine31-May-06 13:09
Mohammed Amine31-May-06 13:09 
AnswerRe: can you tell me how to start with XML ? Pin
George L. Jackson31-May-06 14:22
George L. Jackson31-May-06 14:22 
QuestionPROBLEM IN FILE PATH Pin
Rizwan Rathore31-May-06 8:28
Rizwan Rathore31-May-06 8:28 
GeneralRe: PROBLEM IN FILE PATH Pin
George L. Jackson31-May-06 9:05
George L. Jackson31-May-06 9:05 
GeneralRe: PROBLEM IN FILE PATH [modified] Pin
Rizwan Rathore1-Jun-06 7:53
Rizwan Rathore1-Jun-06 7:53 
AnswerRe: PROBLEM IN FILE PATH [modified] Pin
George L. Jackson1-Jun-06 11:57
George L. Jackson1-Jun-06 11:57 
GeneralRe: PROBLEM IN FILE PATH [modified] Pin
Rizwan Rathore2-Jun-06 11:02
Rizwan Rathore2-Jun-06 11:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.