Skip to main content

I am trying to insert a new item/child into an existing XML element. 

I want to add: <keyword>USA</keyword> to either the top of this list of keywords (Note this is part of a larger XML document.)

 

I’ve tried to use the XMLUpdater to no avail after a substantial Forum search. 

Here’s where I am at with the XMLUpdater:

I assume my XML/XQuery expression is the issue. Any help would be appreciated. 

Thanks in advance!

Version: FME 2022.2.0.0 (Build22765)

Hi @mmccart 

Since you want the new keyword element to be a child of the placeKeys element, the XML Path parameter should be: //dataIdInfo/placeKeys

The Value parameter should be <keyword>USA</keyword> as you want to insert a new element and not an attribute

I hope this information helps!


Thank you @debbiatsafe! That does what I need.


Reply