-
Notifications
You must be signed in to change notification settings - Fork 463
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
Add option to supress xml declaration (snippet-mode?) #55
Comments
That's sounds like a nice feature, thanks. I will give it some thought as of how to implement it. |
If false, it suppresses the XML declaration, as required by #55.
If false, it suppresses the XML declaration, as required by #55.
FYI I think I found a bug in this. If you pass something like so:
It's not able to turn that into an "XML snippet" even when you have |
@megahall I think it's not a bug: you cannot have a XML document with more than one root node. You should wrap that dict inside another dict with a single key: {
"root": {
"@name": "dbl-test",
"description": "dbl-test",
"recurring": {
"hourly": {
"at": "00"
}
},
"type": "ip",
"url": "http://192.168.1.6:8080/pa-dbl.txt"
}
} Otherwise, what XML opening tag should the |
This module does a marvelous job of parsing and unparsing XML. However, when I unparse an ordereddict, I do not always need the version and encoding declaration.
For example, I am creating OrderedDicts from scratch and passing them to unparse. Since these are intended to be snippets instead of fully declared xml, I find myself manually postprocessing this to remove this declaration.
The text was updated successfully, but these errors were encountered: