Solved

XMLUpdater path with multiple variables

  • 27 January 2020
  • 2 replies
  • 5 views

Badge +1

Hi,

I'm understanding slowly how to use XQuery but I have come across yet another stumbling block.

I have an XMLUpdater and I want to replace the contents of the following path with some code:

XML Path:

//group[@id=fme:get-attribute("CODE") @category=fme:get-attribute("CATEGORY")]

I'm pretty sure that the above code is not the correct syntax for referencing two variables at once but I can't find any information on how to do this. Any ideas?

Thanks,

icon

Best answer by takashi 27 January 2020, 17:01

View original

2 replies

Userlevel 2
Badge +17

I guess what you intend to do is

//group[@id=fme:get-attribute("CODE") and @category=fme:get-attribute("CATEGORY")]

or

//group[@id=fme:get-attribute("CODE") or @category=fme:get-attribute("CATEGORY")]
Badge +1

I guess what you intend to do is

//group[@id=fme:get-attribute("CODE") and @category=fme:get-attribute("CATEGORY")]

or

//group[@id=fme:get-attribute("CODE") or @category=fme:get-attribute("CATEGORY")]

Perfect!  Thank you @takashi, the AND statement works just as I'd hoped!

Reply