Unable to convert xml to flatfile?

Unable to convert xml to flatfile?

For example: MAPPING if xml is pickup date map with shipdate in flatfile
if xml is pro number map with pro_no in flat file…how can i achieve this webmethod io integration.

There was no xml schema underneath document. please find attached.

You could create a doctype from the XML (sample or better a schema), and then use this doctype as part of the mapping when you create the document from the XML string. This doctype would likely match the flat file schema 1:1 anyway.

What you see on the left-hand side XML is what I get from the http requester. I’m not sure how I may utilise doctype there. Could you kindly make a suggestion?
This the flow i made in flow service to retrieve xml and convert flatfile, as well as the flatfile connector i created based on my requirements

The typical approach for implementations to map from one format to another:

  • Define a document type for the source data. This defines the structure and elements expected to be received/obtained from the source system. The document type can be created from an XML schema (preferred) or sample XML (be sure it represents all elements or the doc type will be missing desired fields).

  • When the XML is received/obtained, use the appropriate services to convert the XML string to a document. You can optionally enforce the schema rules (generally not necessary but might be useful in your specific environment of the eventual target cannot validate required data or data content). Conceptually, this is equivalent to Java/C#/whatever parsing the string into an object, then using the object to map to the target. You don’t directly map the XML string.

  • Do the same for the target. For a flat file, you can define a flat file dictionary and create a doc type from that. It’s a bit more involved but the concept is the same – define a doc type that represents what structure/elements the target can receive.

  • Map the source document to the target document.

  • Convert the target document to the flat file string representation using flat file services or your own components.



@reamon gave a great description.
In simple terms, define a doctype - and then use this as the target from the XMLString/Stream to document.

Then you can use this document structure to map/create the flatfile.


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