Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8150395
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:03:10+00:00 2026-06-06T15:03:10+00:00

I try to transform a hierarchical XML file to a flat file schema using

  • 0

I try to transform a hierarchical XML file to a flat file schema using Biztalk 2010.

It works fine. Every file is mapped. But the hierarchy is destroyed.

My input xml structure looks like this:

<root>
    <node>
        <element1></element1>
        <element2></element2>
        <subnode1>
            <element1></element1>
            <element2></element2>
        </subnode1>
        <subnode2>
            <element1></element1>
            <element2></element2>
        </subnode2>
    </node>
</root>

The flat file schema looks like this:

<root>
    <node>
        <element1></element1>
        <element2></element2>
    </node>
    <subnode1>
        <element1></element1>
        <element2></element2>
    </subnode1>
    <subnode2>
        <element1></element1>
        <element2></element2>
    </subnode2>
</root>

My input is like this:

<root>
    <node>
        <element1>Test1</element1>
        <element2>Test2</element2>
        <subnode1>
            <element1>Sub11</element1>
            <element2>Sub12</element2>
        </subnode1>
        <subnode2>
            <element1>Sub21</element1>
            <element2>Sub22</element2>
        </subnode2>
    </node>
    <node>
        <element1>Test3</element1>
        <element2>Test4</element2>
        <subnode1>
            <element1>Sub31</element1>
            <element2>Sub32</element2>
        </subnode1>
        <subnode2>
            <element1>Sub41</element1>
            <element2>Sub42</element2>
        </subnode2>
    </node>
</root>

What I expect as output is:

Test1;Test2
Sub11;Sub12
Sub21;Sub22
Test3;Test4
Sub31;Sub32
Sub41;Sub42

But what I get is:

Test1;Test2
Test3;Test4
Sub11;Sub12
Sub21;Sub22
Sub31;Sub32
Sub41;Sub42

Any ideas how I can make Biztalk keep the hierarchy?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:03:11+00:00Added an answer on June 6, 2026 at 3:03 pm

    I don’t have the BizTalk Mapper at hand right now so I only can provide a Xslt solution but basically it will illustrate that you need your map to iterate over your node elements to preserve the structure.

    If you want to achieve this using pure BizTalk Mapping you need a grouping node in your flat output structure to connect your source node element to which will force the map to create the for-each loop like in the following Xslt:

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt">
        <xsl:output method="text" indent="no" />
    
        <xsl:template match="/">
            <xsl:for-each select="root/node">
                <xsl:value-of select="element1" />
                <xsl:text>;</xsl:text>
                <xsl:value-of select="element2" />
                <xsl:text>&#xA;</xsl:text>
                <xsl:value-of select="subnode1/element1" />
                <xsl:text>;</xsl:text>
                <xsl:value-of select="subnode1/element2" />
                <xsl:text>&#xA;</xsl:text>
                <xsl:value-of select="subnode2/element1" />
                <xsl:text>;</xsl:text>
                <xsl:value-of select="subnode2/element2" />
                <xsl:text>&#xA;</xsl:text>
            </xsl:for-each>
        </xsl:template>
    
    </xsl:stylesheet>
    

    You may need to adjust the line breaks (&#xA;) to your output schema needs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to transform one XML format to another using XSL. Try as I
I am using Javascript to load XML and transform it with XSLT. Everything works
I'm using HTML Agility Pack to parse and transform a HTML file, but I
I am serializing a class using simple-xml ( http://simple.sourceforge.net/ ) but when i try
I have an XSLT transform I am using to process an XML file, inserting
I try to transform XHTML webpage using XSLT by extracting some of its parts.
I need to transform XML using xslt. Logic: Split the parent if the parent
I'd like to transform a string that contains an xml using a XSLT, it's
I need to extract data from a .dbf file and transform it into xml.
I am using this method to transform an object to XML: protected XmlDocument SerializeAnObject(object

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.