Retrieve XML

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • nyousfi

    #1

    Retrieve XML

    Hi everyone,

    I hope you can help!

    I have the following query accesing an SQL Server 2000 Box

    SELECT website.website ID,
    website.descrip tion,
    website.URL,
    website.Departm entID
    FROM website
    WHERE website.canDisp lay = 1

    FOR XML AUTO, ELEMENTS

    This comes back with

    <website>
    <websiteID>1</websiteID>
    <description>ya hoo</description>
    <URL>http://www.yahoo.com</URL>
    <DepartmentID>D epartment1</DepartmentID>
    </website>

    Now, thats the easy bit, any idea how I can save the Data coming back
    into an XML file?

    i.e. I want to save the data to c:\test.xml

    Not sure what to use.

    Thanks for the help!

    *-----------------------*
    Posted at:
    Compare the best online casinos in Canada by free spins bonuses, games, payment options and licensing before you sign up.

    *-----------------------*
Working...