c++ - Xml loaded without values -


i have xml.xml file:

<root>root     <pai>pai_1         <filho>pai1,filho1</filho>         <filho>pai1,filho2</filho>     </pai>     <pai>pai_2         <filho>pai2,filho1</filho>         <filho>pai2,filho2</filho>     </pai> </root> 

this file loaded , saved.

file *fp;  mxml_node_t *tree;      fp = fopen("xml.xml", "r");     tree = mxmlloadfile(null, fp, mxml_no_callback);     fclose(fp);      fp = fopen("xmlout.xml", "w");     mxmlsavefile(tree, fp, mxml_no_callback);     fclose(fp); 

on xmlout.xml have:

<root>     <pai>         <filho /><filho />     </pai>     <pai>         <filho /><filho />     </pai> </root> 

where values?

there appears bug in mini-xml 2.8 handling of mxmlloadfd() mxml_no_callback/mxml_text_callback loses text nodes.

see minixml bug 502 details.

as workaround, define own text callback, , pass mxmlloadfd instead.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -