Hi @johnglick, a possible way is to use an XQuery expression to create desired attributes. Once you have extracted each "Sample" element as XML fragment with the XMLFragmenter (or using the "Elements as XML Fragments" parameter in the XMLFlattener and then the ListExploder), you can use the XMLXQueryExtractor to do that.
Example: xmlxquery-example.fmwt (FME 2018.1.0.2)
XQuery:
declare default element namespace "http://tempurl.org";for $d in //Result/Datareturn fme:set-attribute($d/@Element, data($d/Value))
Parameters: Assuming that "xml_fragment_Sample" stores a "Sample" element.
Hi @johnglick, a possible way is to use an XQuery expression to create desired attributes. Once you have extracted each "Sample" element as XML fragment with the XMLFragmenter (or using the "Elements as XML Fragments" parameter in the XMLFlattener and then the ListExploder), you can use the XMLXQueryExtractor to do that.
Example: xmlxquery-example.fmwt (FME 2018.1.0.2)
XQuery:
declare default element namespace "http://tempurl.org";for $d in //Result/Datareturn fme:set-attribute($d/@Element, data($d/Value))
Parameters: Assuming that "xml_fragment_Sample" stores a "Sample" element.
Thank-you very much. Works perfectly!