-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Use string formatting for XML output #5
Comments
This is related to about 30-40% of the code. Which of the both methods is better to use? In my opinion using (Just discussing the issue...) |
@set-killer I think that if unit tests for the XML generation are written, the |
I think it's best if at least for the time being, since it's what the Blender dev requested and it'd be great to have Blender devs working on this plugin as soon as possible, we go ahead with @set-killer If you can take this and push a commit in a reasonable time please tell me, otherwise I can do it myself in a few days (hopefully). |
Yes, working on it. |
Currently the BCE uses raw string output to create XML elements:
This is both hard to read and hard to write. The Blender team suggests using string formatting like they did here:
I suggest something entirely different and in my opinion easier to both read and write (since it takes care of indentation automatically, and is also less error-prone) - using
xml.etree.cElementTree
to generate the XML (which is fast enough) and then usexml.dom.minidom
to prettify/indent it (both are included in the standard library).The text was updated successfully, but these errors were encountered: