mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
📝 Document nested node addition with "_" in xml module (#2371)
* 📝 Document nested node addition with "_" in xml module Nested node addition using "_" to indicate sub nodes, and attributes are only documented in tests and issues, where is hard to find. * 🚨 Fix trailing space * Apply suggestions from code review Add missing collection prefix for modules. Co-authored-by: Felix Fontein <felix@fontein.de> * Add missing comments * Update xml.py * Fix linter warnings Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
7359b1fbe5
commit
4b0d2dcfe0
1 changed files with 16 additions and 0 deletions
|
@ -285,6 +285,22 @@ EXAMPLES = r'''
|
|||
z: http://z.test
|
||||
attribute: z:my_namespaced_attribute
|
||||
value: 'false'
|
||||
|
||||
- name: Adding building nodes with floor subnodes from a YAML variable
|
||||
community.general.xml:
|
||||
path: /foo/bar.xml
|
||||
xpath: /business
|
||||
add_children:
|
||||
- building:
|
||||
# Attributes
|
||||
name: Scumm bar
|
||||
location: Monkey island
|
||||
# Subnodes
|
||||
_:
|
||||
- floor: Pirate hall
|
||||
- floor: Grog storage
|
||||
- construction_date: "1990" # Only strings are valid
|
||||
- building: Grog factory
|
||||
'''
|
||||
|
||||
RETURN = r'''
|
||||
|
|
Loading…
Reference in a new issue