Skip to main content

Hi,

I've run into a curious problem.

I'm using an XmlFragmenter to extract certain elements from an XML file, and specifying that the attributes should be "flattened", giving them a custom prefix.

Then I use a couple of BulkAttributeRenamer with "Remove Prefix String" to remove the prefixes from the attribute names.

However, any transformer added to the flow after the BulkAttributeRenamer's cannot see the renamed attributes, and report an error if I enter the attribute names nonetheless, marking the transformer as invalid.

But if I run the workspace, ignoring the "invalid transformers", the output is as expected !

This is not a good situation, and is an invitation to future problems. Is there a way to remedy this ?

Cheers

Lars I.

Hi @lifalin2016, did you expose the attribute names? Take a look at the "Attributes to Expose" parameter in the XMLFragmenter.


Correction:

 

 

It seems that the problem is with the XmlFragmenter, which doesn't include the read attributes into its list of output attributes.

 

 

The XmlFragmenter has the "Attributes to Expose" setting, but that list is manually populated without any form of help.

 

 

Is there a way to automate the population of this list, at least initially ?

 


Correction:

 

 

It seems that the problem is with the XmlFragmenter, which doesn't include the read attributes into its list of output attributes.

 

 

The XmlFragmenter has the "Attributes to Expose" setting, but that list is manually populated without any form of help.

 

 

Is there a way to automate the population of this list, at least initially ?

 

Sorry I'm unclear the requirement, but there is no way to expose attribute names automatically anyway... Can you provide a simplified source XML document and your desired translation result?

 


Yes you will have to manually insert all the attributes to be exposed, no automated way ( as yet) to do that.


Hi all,

I've come to the conclusion, that XmlFragmenter is simply too problematic to be of any serious use.

Since the XML Reader stores sub-elements as lists too, I'm opting to use the ListExploder instead. Which really is a shame, since XML data ought to be handled by XML transformers. But as long as it's so inefficient, I'm choosing to work around it instead.

Thanks for the input on this.

Ps! There is a way to insert a huge amount of exposed attributes in the XmlFragmenter, but it involves hacking into the FMW in a text editor :-)

Cheers

Lars I.


Reply