开发者

How to use a iteration in Biztalk?

开发者 https://www.devze.com 2023-03-12 04:53 出处:网络
I want to iterate through all cd elements in a xml document. <?xml version=\"1.0\" encoding=\"iso-8859-1\"?>

I want to iterate through all cd elements in a xml document.

<?xml version="1.0" encoding="iso-8859-1"?>
<ns0:catalog xmlns:ns0="http://Catalog.MP">
    <cd>
        <title>Empire Burlesque</title>
        <artist>Bob Dylan</artist>
        <country>USA</country>
       开发者_如何学编程 <company>Columbia</company>
        <price>10.90</price>
        <year>1985</year>
    </cd>
    <cd>
        <title>Hide your heart</title>
        <artist>Bonnie Tyler</artist>
        <country>UK</country>
        <company>CBS Records</company>
        <price>9.90</price>
        <year>1988</year>
    </cd>
    <cd>
        <title>Greatest Hits</title>
        <artist>Dolly Parton</artist>
        <country>USA</country>
        <company>RCA</company>
        <price>9.90</price>
        <year>1982</year>
    </cd>
    <cd>

In XSLT I would do something like that and use the foreach loop:

 <xsl:output method="html" indent="yes"/>

    <xsl:template match="/ns0:catalog">

    <div class="catalog">
        <xsl:for-each select="cd">
            <div class="cd">
                <div class="title">
                    <xsl:value-of select="title/text()" />
                </div>
                <div class="artist">
                    <xsl:value-of select="artist/text()" />
                </div>
                <div class="country">
                    <xsl:value-of select="country/text()" />
                </div>
                <div class="company">
                    <xsl:value-of select="company/text()" />
                </div>
                <div class="price">
                    <xsl:value-of select="price/text()" />
                </div>
                <div class="year">
                    <xsl:value-of select="year/text()" />
                </div>
            </div>
        </xsl:for-each>

But how to do it in Biztalk and use the equivalent functoids?


http://msdn.microsoft.com/en-us/library/ee253826%28v=bts.10%29.aspx - this was more helpful!


Here's a walkthrough on using the table looping functoid - I believe this is similar to what you are wanting:

http://blog.danshultz.com/2007/08/table-looping-functoid-scenario.html

0

精彩评论

暂无评论...
验证码 换一张
取 消