-
Notifications
You must be signed in to change notification settings - Fork 3
2017 API dlibrary.utility.AbstractXmlFile
Dieter Geerts edited this page Sep 24, 2016
·
1 revision
Class used for setting up files with properties through decorators. This way, plugins can decide how their xml files will behave by just setting the appropriate decorators, as these settings can be plugin version dependant. Loading will correct xmltodict output, so we can expect always the same things: - If an element has nothing (empty), xmltodict gives back None, we prefer an empty dict. - If an element has only inner text, xmltodict gives back a str, we prefer a dict with #text. So the contents will start with a dict and contains only dicts and lists down the road with no lists in lists!
- object The most base type
__init__(self, path: str)
-
(get) path
->
str
load(self, create_if_not_found: bool=False) ->
dict
save(self, content: dict)