Home > Software engineering >  How to realize the reads the XML node attribute values in MFC?
How to realize the reads the XML node attribute values in MFC?

Time:10-06

 & lt; ? The XML version="1.0" encoding="utf-8"?> 

116 & lt;/id> 40 & lt;/class>
90 & lt;/id> 47 & lt;/class>

.
.


XML file format as shown above, if I will read each student information, to create a structure should be how to do?
 struct student 
{
Cstrings name;
Int id;
The int class;
Cstrings partner;
Int id;
The int class;
} student [100];

Now write functions can be normal read id, class information, but can't read every & lt; Name1 name='* * * * *' & gt; Node name="* * * * *" this attribute values, what function should be read in the property value of a single node, the current study to the source are one-time read multiple attribute values, and my request is read in an attribute value, but because there is a nested relationship, so the program has been very chaotic, hope great god answer, thank you!!!!!

CodePudding user response:

There are threads of XML processing class under the baidu has pull

CodePudding user response:

http://blog.csdn.net/xuelabizp/article/details/49055371

CodePudding user response:

CMarkup codeproject search

CodePudding user response:

Use pugixml library,
  • Related