Home Page › Forums › BizTalk 2004 – BizTalk 2010 › XML with repeating noded to Flat File
- This topic has 6 replies, 1 voice, and was last updated 3 years, 5 months ago by biztalkgurus.
-
AuthorPosts
-
-
July 27, 2010 at 10:29 AM #25405
I really thought this was going to be easy but…I have an XML file that I need to convert to a flat file. Here is an example of what I need to do:
XML file where nickname repeats unbounded:
<People>
<person>
<nickname/>
<nickname/>
</person>
</People>
The output I need is a new line for each nickname that a person might have:
John Smith, John
John Smith, Johnny
John Smith, Jo
etc
I’ve tried looping functiods in the map. I do have the Flatfile assembler created, just can’t figure out how to handle the repeating elements. Any clues? Most examples out there are going flat file to XML.
Thanks!
-
July 27, 2010 at 12:52 PM #25407
Hi,
I’ve built a sample according to your specs, and uploaded it to my account here in BizTalkGurus. Click on my avatar, go to My File section on the right and look for the zipped file named “People_Artifacts.zip”. Download it to your machine, and unzip it, it contains the following files:
People_FF.xsd (Flat file schema)
People_XML.xsd (XML schema)
People_Map.btm (Map)
People_XML_output.xml (XML test file used by Map for input instance)
People_Map_output.txt (Text test file used by Map for output instance)
The artifacts were built using BizTalk 2006 R2 version, so you can easily convert them to version 2009.
I hope this is a workable solution for you,
Daniel.
-
July 27, 2010 at 3:15 PM #25409
Wow – ask for a hint and get a solution. Thank you very much for the effort. I am having issues when I add multiple persons, but I can hopefully get it from here. Again – thank you!
-
July 27, 2010 at 3:19 PM #25412
Adjusted the schema and made people unbounded and now I’m rocking and rolling. Thank you!
-
-
July 28, 2010 at 4:23 PM #25429
I am having a similar difficultis – you don’t have a sample that generates a positional flat file for a complex do you? I’ve been beating my head for two days now.
-
July 29, 2010 at 7:57 AM #25436
Hi,
Do you have a sample data for your XML and Flat file? It’s difficult to figure out what you need without seeing the data first.
-
-
-
November 19, 2020 at 4:16 PM #50482biztalkgurus
Foul is Fair • Hannah Capin • 9781250239549
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.