-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Only one declaration is allowed #399
Comments
Good! Fixing this would also resolve #340 I can craft a fix next week. @leethomason, do you have any objections? |
Not sure I am following this right. I am no XML but I am using my XML file with a XSL file, thus this is my declaration: Andrew Date: Fri, 4 Dec 2015 06:42:16 -0800 Good! Fixing this will also resolve #340 I can craft a fix next week. @leethomason do you have any objections? — |
#340 is a partial fix from a previous bug. Since TinyXML-2 doesn't actually interpret the declarations, I don't think the limit (only one) is really helping. I've been leaning to the other: remove the limitation entirely and just read all the declarations it finds. |
The current code also prevents comments at the start of an XML file. It appears that this is technically not valid XML but it's a fairly common pattern, at least in our code base. For example, this will fail to parse:
|
Good point - flagging as bug. I agree that's something that shouldn't cause a parse failure. |
Bool true/false rather than 0/1 : #399
@leethomason This should have been resolved once #496 was merged |
Tinyxml2 allows only one declaration. It prevents the reading files containing and .
Reference : http://www.xml-model.info/
Commenting out the test around line 970 of tinyxml2.cpp fixes the bug, but the correct way to do this would be to test if all previous nodes are declarations instead of testing if declaration nodes are the first node of the document.
The text was updated successfully, but these errors were encountered: