Kinook Software Forums

Kinook Software Forums (
-   [VBP] General Discussion (
-   -   Using Write XML action to create an element if not found? (

DRKev 07-05-2016 08:48 AM

Using Write XML action to create an element if not found?
I'm trying to use the WriteXML action to create an element if it does not exist, without much luck.

The option under the XPath tab to "Create element/attribute if it doesn't exist" is checked.

I'm trying to write a simple log file to record information for specific versions:-


If I set the XPath query to (and existing entry):
I then set the attribute to update to 'versionNumber' and try to assign the value ''

I am told "File already up-to-date". This therefore indicates that the XPath is at least valid and that a matching entry already exists.

If I try to add a new entry for version, and change the XPath and new value accordingly, the step produces an error:
XPath expression not found.

This is not intuitive as it implies there is no XPath expression, which of course there is. There is no matching element, but I requested that a new item be created.

Have I missed something?
The documentation is rather sparse for XML with only a few very simple examples.
Does the WriteXML action support this simple request?

kinook 07-05-2016 09:17 AM

1 Attachment(s)
That works in my tests. See the attached project and log file.

All times are GMT -5. The time now is 11:46 AM.

Copyright 1999-2022 Kinook Software, Inc.