• honza.mf (5/20/2010)


    malleswarareddy_m (5/20/2010)


    Thanks for reply.I know that there are different types out put for xml.

    Includes For Xml 1)path 2)auto 3)raw 4)explicit.

    But when i saved this output and opened with IE it shows some error.Even though it will open in ssms.I am using IE which is Old version 6.0.Is this error is due to IE.please explain in brief.

    To open the file in some browser, you have to enclose the generated segment in root element. Some browsers must have XML declaration, some not.

    Use:<?xml version="1.0" encoding="utf-8"?>

    <data>

    Returned segment here

    </data>

    Be careful with th encoding parameter: it MUST fit the encoding of the file saved.

    That's why i had given the correct query

    select * from #t for xml AUTO,ROOT

    you did not saw my enitre reply.

    Malleswarareddy
    I.T.Analyst
    MCITP(70-451)