Question

strange List-result from the HTMLExtractor

  • 20 February 2023
  • 4 replies
  • 5 views

Badge

Hello dear FME community members,

 

I use the HTTPCaller with an output in HTML. From that output I want to get values from the HTML and get them exposed as attributes. Therefore I use the HTMLExtractor to extract the values of the CSS selector and return the output als a List Attribute.

The result is that I see one feature with several listattributes. After that I want to explode the list with the ListExploder. The strange thing is that the ListExploder dies not see the List attribute.

HTMLExtracter_ListExploder 

When I use a AttributeExposer and expose the list (list{}) then the ListExploder sees the list...a strange behavior!?!?

 

HTMLExtracter_AttributeExposer_ListExploder 

In several examples on the community the AttributeExposer is not mentioned or used to expose the list afther the HTMLExtractor, see an example: https://community.safe.com/s/question/0D54Q00008EcEOlSAN/how-can-i-isolate-html-table-values-td-based-on-attribute-name?t=1676911484807

 

I expected that the ListExploder sees the output list made in de HTMLExtractor.

Is this a wrong assumption on my part or is this a strange behavior of this transformer (bug?)?

Can anyone tell me if it is possible (normal) to not use the attributeExposer to show the list after the HTMLExtractor.

 

thank you,

Danny


4 replies

Badge +1

Hi @dannymeus​.

 

I was going crazy trying to figure this out yesterday as well.

It looks to me like the list the html extractor creates is one of the unstructured lists (in my extractor I only have one level of html to extract).

But when doing the list exploder I get the same response, that there isn't a list in the workflow.

 

I suspect this is a bug as looking at the attributes on the HTMLExtractor when the transformer is expanded the list name I have set (name) displays as a regular attribute rather than a list with the {} on it.

 

List attribute issueOnce we add the attributeexposer we can see the list name appear (Name{}) as it should.

This might be something that the guys at safe will need to look into.

 

Thank you for the workaround of the exposer, I'm sure it would have taken me hours to think of that (after having gone through each list transformer several times to try them).

 

Also great choice on dark mode, yet another awesome change the safe team have added in.

Cheers.

Michael.

Userlevel 3
Badge +17

Hello @dannymeus​  and @michaelbreen​ ,

Apologies for the inconvenience this has caused! The behaviour seen is a reported bug that has been fixed in FME 2022.2 (builds 22726+).

If you are unable to upgrade to a newer version of FME, continue using AttributeExposer before ListExploder workaround.

Badge +1

Hi @debbiatsafe​.

 

Ahhh foiled by my own plan to wait for FME23 before upgrading.

Thank you for the info and I'll have to keep the workaround until we upgrade.

 

Thank you.

Michael.

Badge

Hello @dannymeus​  and @michaelbreen​ ,

Apologies for the inconvenience this has caused! The behaviour seen is a reported bug that has been fixed in FME 2022.2 (builds 22726+).

If you are unable to upgrade to a newer version of FME, continue using AttributeExposer before ListExploder workaround.

@debbiatsafe​ thank you for this quick response.

Good to hear that my/our @michaelbreen​ logic was correct. Unfortunately I will have to be patient until we as a company have also carried out the server update.

 

best regards,

Danny

 

Reply