Skip to main content
Solved

XMLUpdater - doesn't work on fragments?


mathiku
Contributor
Forum|alt.badge.img+7

I've always had a hard time with XMLUpdater, but it usually ends up working.

This time I just can't make sense of the errors and how to solve it.

I have two XML, I want to take elements from one of them and use those elements to replace the elements in the other XML.

 

If I take the exact text from the XML-fragmenter at create an attribute containing just that, the XMLUpdater accepts it and produces the expected result.

If the XMLUpdater is part of the same flowpath as the XMLFragmenter the XMLUpdater will throw an error.

I even tried putting it into a new attribute with different datatype.

 

Can that be right??

 

The attached workspace is made in FME 2023.2 but the error is the same in FME 2022.2.

Any help or ideas is appreciated.

Best answer by takashi

mathiku wrote:

Thank you, I'm afraid it doesn't change much. I get different versions of the same errors.

Did you check the workspace? I'm curious about how this makes sense, to me it looks like a result of how FME handles the data(pointers) under the hood.

I think the attached workspace generates your desired result.

I saved this workspace with FME 2023.0.

View original
Did this help you find an answer to your question?

4 replies

takashi
Supporter
  • December 13, 2023

Hi @mathiku​ ,

This setting could work for you.

  • Update Type: Replace
  • Value: fme:get-xml-attribute("Assortments")

See also the screenshot.xmlupdater-parameters


mathiku
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • December 13, 2023
takashi wrote:

Hi @mathiku​ ,

This setting could work for you.

  • Update Type: Replace
  • Value: fme:get-xml-attribute("Assortments")

See also the screenshot.xmlupdater-parameters

Thank you, I'm afraid it doesn't change much. I get different versions of the same errors.

Did you check the workspace? I'm curious about how this makes sense, to me it looks like a result of how FME handles the data(pointers) under the hood.


takashi
Supporter
  • Best Answer
  • December 13, 2023
mathiku wrote:

Thank you, I'm afraid it doesn't change much. I get different versions of the same errors.

Did you check the workspace? I'm curious about how this makes sense, to me it looks like a result of how FME handles the data(pointers) under the hood.

I think the attached workspace generates your desired result.

I saved this workspace with FME 2023.0.


mathiku
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • December 14, 2023
mathiku wrote:

Thank you, I'm afraid it doesn't change much. I get different versions of the same errors.

Did you check the workspace? I'm curious about how this makes sense, to me it looks like a result of how FME handles the data(pointers) under the hood.

I see it works. But the only tiny difference is that you specify read-method using 'fme-get-xml...'. Thanks so much for the help, but I feel like this is something Safe should fix.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings