Creating an XML document using the function FOR XML PATH

  • Hi,

    I do have an issue creating an XML document of that format(see below) with the command FOR XML PATH on SQL.

    I do not see how I can create the table to put the info and also I can create the SQL query, especially because of the node "body".

    If you need any other explanation about my issue please ask.

    Thanks for your help.

    Christophe

    1

    bibolo

    2

    crazy

    !!! there is a node called body which does not appear here. there is a first body after book. This body ends after /description. Then there is another node body before the new value 2. this node ends just before the end of /book.

    I know it sounds crazy but I cannot have it created :pinch:

  • I may not be clear about my question. If you need any other info please ask.

    thanks again for reading it.

  • You might want to have a look at this article [/url]. It should help you finding the method you're looking for.

    If not, please provide sample data as described in the link in my signature.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Thanks a lot> I have a look at this article and I keep you in touch.

    regards,

    Chris

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

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