XML Namespaces for itunes (using FOR XML PATH)

  • I have created a successful and properly formatted itunes RSS XML Feed for podcasting, however i wanted to clean up the XML Namespace appearing more than once.

    Here is the basic T-SQL for my statement:

    WITH XMLNAMESPACES ('http://www.itunes.com/dtds/podcast-1.0.dtd' as itunes)

    SELECT '2.0' AS '@version',

    (SELECT ............

    (SELECT..........

    FROM sqltablename1 for xml path ('item'), TYPE

    ) FOR XML PATH('channel'), TYPE

    )

    FOR XML PATH('rss')

  • Look at my reply in the following thread:

    http://www.sqlservercentral.com/Forums/Topic748200-149-1.aspx

    ML

    ---
    Matija Lah, SQL Server MVP
    http://milambda.blogspot.com

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply