libplist: can't import single-node plist via Python bindings
-
Martin S.
- State changed from new to open
- Tag set to api, bindings, cython, libplist, python, xml
Thanks for reporting, breaking the API is no issue and using a class method of Node sounds much more reasonable to me, too. However, patches are very welcome. ;)
-
Nikias Bassen
- Assigned user set to Nikias Bassen
Is this still up-to-date? Instead of using Structure_from_xml I just used from_xml() like this and it worked:
#!/usr/bin/python import plist xml = """ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <string>fail</string> </plist> """ print(plist.from_xml(xml).to_xml())output:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <string>fail</string> </plist> -
Martin S.
- State changed from open to invalid
- Assigned user changed from Nikias Bassen to Martin S.
- Milestone set to 1.2.0 Release
As described by Nikias, it is indeed possible to get what you ask for.
Please create a ticket on github.com if still not sufficient. Thanks.This ticket tracker is deprecated as we've moved to github.com/libimobiledevice.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
