The 'Update Type' etc. required in the XMLUpdater is different depending on whether the XML tag already exists or not ('Replace Contents' or 'Insert' respectively). This makes it very awkward to deal with XML of unknown completeness.
There should be a way to create a tag , including all the hierarchy above it, if the tag doesn't exist and just 'Replace Contents' if the tag does already exist.
e.g.
Update Type | XML Path | Value Type | Value |
Insert or Replace Contents | /metadata/dataIdInfo/idCitation/date/reviseDate | XML/XQuery | fme:get-attribute("_timestamp") |
<metadataxml:lang="en"> <dataIdInfo> <idCitation> <date> <reviseDate>20161116</reviseDate> </date> </idCitation> </dataIdInfo> </metadata>
...whether the starting document was
<metadataxml:lang="en"> </metadata>
or
<metadataxml:lang="en"> <dataIdInfo> <idCitation> <date> <reviseDate>Yesterday</reviseDate> </date> </idCitation> </dataIdInfo> </metadata>