• I believe I need to use FOR XML EXPLICIT because of my need for the CDATA directive, and I also want to be able to have a collection based on a related table (the SKU's in the example below) within my XML results. Is there a way to specify a namespace when using FOR XML EXPLICIT or on the flip side is there a way for me to have CDATA and collections if I don't use EXPLICIT mode.

    I need my results to look like this:

    <product:product xmlns:product="http://www.myco.com/product" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.myco.com/product rl-product+CustomProductCatalog+product.xsd " xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" ID="productprod000191" repositoryId="prod000191">

    <product:product.heightMax xsi:nil="true"/>

    <product:product.gender collectionType="List" componentType="string">

    <product:string>Womens</product:string>

    </product:product.gender>

    <product:product.displayName xsi:type="string"><![CDATA[a shirt, logo]]></product:product.displayName>

    <product:product.id xsi:type="string"><![CDATA[prod000191]]></product:product.id>

    <product:product.color collectionType="List" componentType="string">

    <product:string>Red</product:string>

    <product:string> White</product:string>

    </product:product.color>

    <product:product.childSKUs collectionType="List" componentType="itemRef">

    <product:childSKUssku ID="sku84016" repositoryId="84016">

    <product:sku.displayName xsi:type="string"><![CDATA[small, green]]></product:sku.displayName>

    <product:sku.newSku xsi:type="boolean">true</product:sku.newSku>

    <product:sku.listPrice xsi:type="double">16.95</product:sku.listPrice>

    <product:sku.id xsi:type="string"><![CDATA[84016]]></product:sku.id>

    </product:childSKUssku>

    <product:childSKUssku ID="sku84020" repositoryId="84020">

    <product:sku.displayName xsi:type="string"><![CDATA[large, green]]></product:sku.displayName>

    <product:sku.newSku xsi:type="boolean">true</product:sku.newSku>

    <product:sku.listPrice xsi:type="double">16.95</product:sku.listPrice>

    <product:sku.id xsi:type="string"><![CDATA[84020]]></product:sku.id>

    </product:childSKUssku>

    </product:product.childSKUs>

    <product:product.form xsi:nil="true"/>

    </product:product>

    What mode do you recommend?