Skip to main content
Solved

XMLUpdater path with multiple variables

  • January 27, 2020
  • 2 replies
  • 24 views

Forum|alt.badge.img+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,

Best answer by takashi

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")]
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • January 27, 2020

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")]

Forum|alt.badge.img+1
  • Author
  • 271 replies
  • January 27, 2020

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!