Question

XMLUpdater - Updating values with the same XML path

  • 23 October 2018
  • 1 reply
  • 11 views

Hello FME community!

I am currently working on updating the metadata of a feature class using the XMLUpdater. Everything is going great so far but I am running into a little bit of a wall here. I am trying to update the Horizontal / Vertical positional accuracy in the metadata sheet. Theses can be found in Resource/Quality/Report section of the sheet. Here is a picture with the fields in question:

As you can see on this example its pretty simple. You set the Dimension and fill the Horizontal Positional Accuracy report in the Description. My problem arises because I currently need two reports, one for Horizontal and one for Vertical and once I create them the XML reads as follow:

As you can see both XML Path for the XMLUpdater are the same with the exception of the "dimension". That means that the XML Path for both horizontal and vertical Description read as "/metadata/dqInfo/report/measDesc".

My question is: Is there a way to differentiate between these two locations in the XML Path? So I can fill the Description with two different reports.

I have tried adding the "dimension" and the full report tag in the path with no success. I am looking for any feedback to point me in the right direction.

Thanks for helping a fellow GIS Student in advance.


1 reply

Userlevel 2
Badge +17

Yes you can. Try this expression.

/metadata/dqInfo/report[@dimension='horizontal']/measDesc
This site could be a good starting point to learn XPath: XPath Tutorial

Reply