Skip to main content

Hi, I'm trying to understand XSD Driven XML Writer and wrote a simple example that reads 3 CSV file with customer and address data and write a xml file containing all of the feature types.

The resulting xml is empty when I run the whole process. Running "customers" only writes at least the top element into the xml.

I connected all feature types with xml_parent_id and xml_id together.

Unfortunately the error message is saying nothing that would help me to find my problem.

 

Please help me with providing a information or repairing my work sheet.

I could also not find any example for this problem.

 

@hasant1973​ Thanks for including a sample dataset and workspace. You're very close.

The xml_id must be unique for the entire dataset. FME will use those to make the associations between the objects. If you already have an id (custid) then you can use a prefix to make it unique - i.e.

customer-@Value(custid)

The deepest nested object (address) doesn't need an xml_id as nothing points back to it.

I've attached a slightly revised workspace (FME 2022.2)


@hasant1973​ Thanks for including a sample dataset and workspace. You're very close.

The xml_id must be unique for the entire dataset. FME will use those to make the associations between the objects. If you already have an id (custid) then you can use a prefix to make it unique - i.e.

customer-@Value(custid)

The deepest nested object (address) doesn't need an xml_id as nothing points back to it.

I've attached a slightly revised workspace (FME 2022.2)

Oh, I completely miss understood the documentation. It works now. Thanks a lot.


Reply