Skip to main content

With XMLUpdater I am changing values in an XML-file. I'd like to generate the xpath dynamically based upon a column ('Attribuut') in an Excel file. However, when I select this attribute in the text editor for the XML Path, the generated code is wrong. It is:

//*:featureAttributei*:name/text() = 'fme:get-attribute("Attribuut")']/*:definition

where it should be:

//*:featureAttributeu*:name/text() = '@Value(Attribuut)']/*:definition

I can change this myself and everything works fine, but I'm just curious: Is this a bug, or does FME generate the xpath as one might expect? Is it something I do wrong?

0684Q00000ArBCkQAN.png

In XQuery expressions, you should not quote an XQuery function call. Try this one.

//*:featureAttributet*:name/text() = fme:get-attribute("Attribuut")]/*:definition

The "@Value" is an FME function, which will be replaced with specified attribute value before the XQuery expression is evaluated.


Thank you again @takashi!


Reply