Splitting <tr> into new columns

I’m using mac version of KNIME. I want to create simple project by getting html table fragment using xpath. The problem is when I choose elements I get data like this:

I want to split id, movie name and hours watch in new columns. I tried using Cell splitter, but I can’t do it as there’s not separator. Is there away to insert a specific symbol after the end of each element in so I can split this data? Can someone help me?

Thank You.

Welcome to the forum @lukas221.

In the future, can you provide more context? Ideally we’d need example data and/or an example workflow so that we have something to work with. It’ll also help if you tell us more about what you’ve tried.

For your issue, I think the mistake is trying to extract the entire table at once, instead of piece by piece.

Assuming you’re trying to extract data from the main table on https://top10.netflix.com/, I recommend using separate XPaths, one for each column.

When configuring each XPath, use wildcards for the table rows. . For example, column 1 ("#") is

/html/body/div[1]/div/main/section[2]/div/div[5]/div/div[1]/div/table/tbody/tr[*]/td[1]

I got the paths from a browser using the Inspect feature and made the wildcard modifications where necessary.

Make sure to select “Multiple Rows” in the Multiple tag options box.

image

This is the end result:

image

2 Likes

Hi, thanks for the fast reply! I’ll try to add more specifics next time. But your answer sold my issue, thank you!

2 Likes

Great, I’m glad it helped. Can you mark this as solved?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.