At the moment, the del subcommand removes the values(!) from the given property.
Preferred Solution
In some cases, clearing the value but leaving the element as it is could not be enough. For readability reasons, if an element isn't really needed, why should it be there (although empty)?
If you need to clear/remove some properties, the del subcommand should support a special value which should really remove the respective element.
IMHO, the del subcommand should be extended:
Support a special option (for example --discard) which removes the given element completely.
Improve the output when deleting one or more properties. At the moment, we get:
[foo.xml] Property 'bar' has been deleted.
[foo.xml] Saved changes.
IMHO this is overly verbose. Could we simplify the message? I think we could remove the "Saved changes" part, for example:
[foo.xml] Property 'bar' has been cleared.
or for multiple properties:
[foo.xml] Properties 'bar', 'baz', and 'fuz' have been cleared.
Improve the help string of del:
Delete properties from XML documents
Could be changed to something like:
Clear values in properties or discard properties completely
Current Situation
At the moment, the
del
subcommand removes the values(!) from the given property.Preferred Solution
In some cases, clearing the value but leaving the element as it is could not be enough. For readability reasons, if an element isn't really needed, why should it be there (although empty)?
If you need to clear/remove some properties, the
del
subcommand should support a special value which should really remove the respective element.IMHO, the
del
subcommand should be extended:--discard
) which removes the given element completely.Improve the output when deleting one or more properties. At the moment, we get:
IMHO this is overly verbose. Could we simplify the message? I think we could remove the "Saved changes" part, for example:
or for multiple properties:
Improve the help string of
del
:Could be changed to something like: