1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

xml: Add an example for absent (#2644)

Element node can be deleted based upon the attribute
value.

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2021-05-27 22:34:52 +05:30 committed by GitHub
parent 285639a4f9
commit 795125fec4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -301,6 +301,23 @@ EXAMPLES = r'''
- floor: Grog storage
- construction_date: "1990" # Only strings are valid
- building: Grog factory
# Consider this XML for following example -
#
# <config>
# <element name="test1">
# <text>part to remove</text>
# </element>
# <element name="test2">
# <text>part to keep</text>
# </element>
# </config>
- name: Delete element node based upon attribute
community.general.xml:
path: bar.xml
xpath: /config/element[@name='test1']
state: absent
'''
RETURN = r'''