-
-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot load anything in MXML and how to debug the problem?? #327
Comments
It would be useful to see a sample XML file you are trying to load. Also, the default error callback will send any error messages off to stderr, so if you do this from a console application you'll be able to see those errors. (regular applications don't have a console so you'd need to provide your own error callback to see the messages...) Also, the Finally, Mini-XML 4 is available as source. Your own code will require some conversion to it but the migration guide that is part of the documentation should point you in the right direction. |
Thanks for your reply! I tried to run the code compiled in Visual Studio, but not any errors came back, just cannot corrrectly get the XML content. Here is the content from 'tag.xml', one of my XML(yes...every XMLs cannot be read in my code...very sad):
Thanks for your advice for accessing the structure, I would get more information from the migration guide! |
Hi there! Thanks for your patience... But I still have some problems like this, I tried to simplify my problems to find out what's happening in my scene. And run with MXML4.0, With writing some test code like these:
But the console shows:
And the
|
For resetting the callback output of the console, I found that there are different RANDOM errors comes out when 1. just failed loading files 2. "
3. "
4. "
|
I really have no guidance here. If you can attach an actual file to this issue I might be able to look at that, but my only guess is that there is some sort of character encoding issue that is giving Mini-XML trouble. For the record (and this is documented in many places), Mini-XML only supports reading UTF-8 and UTF-16 encoded XML and only supports writing UTF-8 encoded XML. |
Here is the XML loading code which is not work.
Here is the XML file. But I saved it as UTF-8 file. I tried to fix the problem by saving it as ASCII file and then re-save it as UTF-8, but still unwork... Great Thanks! |
I tried tol load xmls with
mxmlLoadFile(NULL, fp, MXML_OPAQUE_CALLBACK);
, but got0x0000000000000000 <NULL>
as result.The whole XMLLoad is liked this:
as I seen that filename can be opened and the fp is like
0x0000017a365acfa0 {_Placeholder=0x0000000000000000 }
, I checked lots of information that the result means that the file can be opened successfully, and the XML file used to be read before, and no changes happened.So, could you please tell me how to find out the real reason for why I cannot load XML with
mxmlLoadFile
??My operation system is Windows10 and Visual Studio 2017, with MXML 2.9
BTW, could you tell me how to update MXML 2.9 to MXML4? I checked the log that MXML4 seems quite different from MXML3(might be also 2.9), I tried to replace the direction of dll and libs and shows that
mxml_node_s
is not fit formxml_node_t
.Great thanks again!
The text was updated successfully, but these errors were encountered: