• Pretty sure you cannot do this using XML Auto.

    Try Using XML Path

    Here's an example using Path from AdventureWorks

    SELECT

    h.SalesOrderID,

    h.OrderDate,

    h.DueDate,

    h.ShipDate,

    h.Status,

    h.SubTotal,

    h.TaxAmt,

    h.Freight,

    h.TotalDue,

    (SELECT

    CarrierTrackingNumber,

    OrderQty,

    ProductID,

    UnitPrice,

    UnitPriceDiscount,

    LineTotal,

    ModifiedDate

    FROM [Sales].[SalesOrderDetail] d

    WHERE h.SalesOrderID = d.SalesOrderID

    FOR XML PATH('OrderDetail'), ROOT('OrderDetails'), Type)

    FROM [Sales].[SalesOrderHeader] h

    WHERE h.SalesOrderID = 43666

    FOR XML PATH('SalesOrder'), ROOT('SalesOrders')

    <SalesOrders>

    <SalesOrder>

    <SalesOrderID>43666</SalesOrderID>

    <OrderDate>2001-07-01T00:00:00</OrderDate>

    <DueDate>2001-07-13T00:00:00</DueDate>

    <ShipDate>2001-07-08T00:00:00</ShipDate>

    <Status>5</Status>

    <SubTotal>6079.6842</SubTotal>

    <TaxAmt>486.3747</TaxAmt>

    <Freight>151.9921</Freight>

    <TotalDue>6718.0510</TotalDue>

    <OrderDetails>

    <OrderDetail>

    <CarrierTrackingNumber>D46A-40CA-8D</CarrierTrackingNumber>

    <OrderQty>1</OrderQty>

    <ProductID>764</ProductID>

    <UnitPrice>419.4589</UnitPrice>

    <UnitPriceDiscount>0.0000</UnitPriceDiscount>

    <LineTotal>419.458900</LineTotal>

    <ModifiedDate>2001-07-01T00:00:00</ModifiedDate>

    </OrderDetail>

    <OrderDetail>

    <CarrierTrackingNumber>D46A-40CA-8D</CarrierTrackingNumber>

    <OrderQty>1</OrderQty>

    <ProductID>753</ProductID>

    <UnitPrice>2146.9620</UnitPrice>

    <UnitPriceDiscount>0.0000</UnitPriceDiscount>

    <LineTotal>2146.962000</LineTotal>

    <ModifiedDate>2001-07-01T00:00:00</ModifiedDate>

    </OrderDetail>

    </OrderDetails>

    </SalesOrder>

    </SalesOrders>