Convert an .xlsx or table in knime to a xml file. As pert the xml format(present in a xml reference file)

Hi All,

I’m using Knime 4.5.1 and currently have specific requirement of converting a knime table or .xlsx file to a .xml file(taking one existing .xml file as reference for correct header, syntax and footer data, have tried all the knime nodes and used xml python libraries xml.etree and minidom but the format is coming wrong everytime.

Attaching the xml(reference file) & .xlsx(sample file
Reference.xml (2.4 KB)
Sample.xlsx (18.3 KB)
)

Any pointers in right direction will be very helpful & highly appreciated

Thanks & Regard

Hi @charabor1 , and welcome to the KNIME community,

Perhaps you could share some sample data (your xlsx simply shows us that xml you have created, rather than the source data).

Also if you are able to share a workflow demonstrating what you have tried so far, we might be able to give pointers on adjustments you could make, or alternative approaches.

Currently it is difficult to give you any guidance without those things. thanks.

3 Likes

Reference.xml (2.4 KB)
9061.K.1_Belgium_AnaCredit_CEP_stage_3_test_version_2.knwf (225.1 KB)

Hi @charabor1 , unfortunately your workflow cannot be executed because it relies on access to your files which of course we do not have. Without being able to see some data there is no easy way to work this out.

Can you provide a simple example data that you are attempting to build the xml from? This should be test data or data with anything sensitive replaced/removed

I’m sharing a sampl expected output.
I’m also sharing the tabular data I’ve in excel & csv files.
Hope this would be adequate(if not knime, I can us python source nodes too)
Stage3.xlsx (10.2 KB)
Stage3.csv (2.9 KB)
Reference.xml (2.4 KB)

Hi @charabor1 , none of those uploaded files contain the raw tabular data.

not sure about the raw part but my tabular data is the one I’ve in .csv &.xlsx file

Are you certain of that?

This is what I see:

your csv file:

your xlsx file:

It’s resolved with a python code. Thanks