how to update existing or create new XML node with Augeas
问题 For the following XML: <properties> <entry key="foo">bar</entry> </properties> I can update exiting entry with attribute "foo" with the following augeas command: set /files/test.xml/properties/entry[#attribute/key='foo']/#text bar2 Is there augeas command(s) to create a new node (with key attribute) if there is no existing entry with the input attribute, and update existing if entry already exists with the input attribute? I tried the following: set /files/test.xml/properties/entry[#attribute