segregate the given input xml and store into separate columns

HI Knime Community team,

 

I have a small task with knime tool and kindly suggest for my below query.

 

I have the input as below.

2015-05-01 00:03:21,962 NodeName CellName ModuleName TechnologyName <one: xml>..xml contents.</one: xml>
2015-05-01 00:03:21,962 NodeName CellName ModuleName TechnologyName <two: xml>..xml contents.</two: xml>
2015-05-01 00:03:21,962 NodeName CellName ModuleName TechnologyName <one: xml>..xml contents.</one: xml>
2015-05-01 00:03:21,962 NodeName CellName ModuleName TechnologyName <two: xml>..xml contents.</two: xml>

Using String manipulation node I have splitted only xml as below and the output has been stored each rows sequentially.

Row0 -  <one: xml>..xml contents1.</one: xml>

Row1 -  <two: xml>..xml contents2.</two: xml>

Row2 - <one: xml>..xml contents3.</one: xml>

Row3 - <two: xml>..xml contents4.</two: xml>

 

Further, I would like to segregate this output and store in different columns based on the xml

e.g (expected output)

 

column1 :                                                                    column2:

<one: xml>..xml contents1.</one: xml>                   <two: xml>..xml contents2.</two: xml>

<one: xml>..xml contents3.</one: xml>                   <two: xml>..xml contents4.</two: xml>

 

Kindly, suggest me to achieve the above using knime tool inorder to analyse the xml elements.

 

 

Thanks in advance.

 

Best Regards,

Velu

Hi Knime team,

We have achieved this using Java Snippet Row filter node. Got the separate xml string output.

Please, let us know if there is any other way of solution available.

 

Best Regards,

Velu

 

Hi,

you could also extract the number with a string manipulation node. Then you could take the number % 2, which results in 0 or 1. Using a row splitter you could then split the table based on this column containing 0 or 1. After resetting the RowIDs with a RowID-Node, you could join the tables back together and clean up unnecessary columns with a column filter. This seems to be more complicated than your solution, though.

Regards,

Alex