• That actually doesn't work so well. Try it with the following data and see...

    <AccountDetailsRsp AccountNum="1" AccountStatus="AccountStatus1">

    <PlayerInfo PlayerID="1" FirstName="FirstName1" LastName="LastName1">

    <AddressList>

    <PlayerAddress>

    <Address AddressType="primary" City="City1" State="State1" Zip="Zip1"/>

    <FutureUse />

    <Phone PhoneNumber="PhoneNumber1" PhoneType="Type1" />

    <Phone PhoneNumber="PhoneNumber2" PhoneType="Type2" />

    </PlayerAddress>

    <PlayerAddress>

    <Address AddressType="billing" Zip="Zip2" State="State2" City="City2" />

    <FutureUse />

    <Phone PhoneNumber="PhoneNumber3" PhoneType="Type3" />

    </PlayerAddress>

    </AddressList>

    </PlayerInfo>

    </AccountDetailsRsp>

    What I get from that using your code is...

    AccountNum AccountStatus PlayerID AddressType City Zip Phone PhoneType

    ---------- -------------- -------- ----------- ----- ------ ------------ ---------

    1 AccountStatus1 1 billing City2 State2 PhoneNumber1 Type1

    1 AccountStatus1 1 billing City2 State2 PhoneNumber2 Type2

    1 AccountStatus1 1 billing City2 State2 PhoneNumber3 Type3

    1 AccountStatus1 1 primary City1 State1 PhoneNumber1 Type1

    1 AccountStatus1 1 primary City1 State1 PhoneNumber2 Type2

    1 AccountStatus1 1 primary City1 State1 PhoneNumber3 Type3

    (6 row(s) affected)

    I hope someone else drops in because I don't know enough about XML to fix it.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)