cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Excel columns to xml using paticular xsd

rashmi
New Contributor III

Hi All,
I had parsed the excel sheets which is required and got the columns and rows need to convert to xml with xsd as shown below

community1

community2

B & C are columns of one excel sheet after parsing
community3

pls could any one help how incoming data should be structured/framed(Json format) to satisfy this condition in xsd

Any help is appreciated.

cc: @dmiller, @koryknick, @ptaylor, @bojanvelevski, @siwadon, @del

7 REPLIES 7

rashmi
New Contributor III

I had formatted to below json excluding XML attribute just for testing purpose but xml generator is giving empty xml pls could any one help if i am missing anything or suggest any way
json(i/p)

community4

xml(o/p)

community5

Hi @rashmi,

It would be much easier if you send us the sample input data, and the XML used, complete with the Apache code.

If Iโ€™m not mistaken, you are doing additional referencing step in the #For cycles.

image

Try that and let us know.

rashmi
New Contributor III

PIMData.txt (1.8 KB)

hi @bojanvelevski i was trying to frame that structure will share the sample input and xsd pls could u help pls
samplerecords.json (262 Bytes)
Please convert PIMData.txt to PIMData.xsd as the template is in that format
Please also find output expected xml in txt format
outputxml.txt (3.2 KB)

Hi rashmi,

Good day, instead of using an xml generator snap have you tried the xml formatter? I donโ€™t know if this is your required output but xml formatter accepts an outgoing format as XSD

XML output using PIMData.xsd

image

image

image

Updates:

image,

Iโ€™m not that familliar with XSD so I manipulate the sample input using a mapper snap, attached poc pipeline

canvas 15_2022_12_03.slp (16.8 KB)

Thanks,
EmEm