Nested XML question

5 pts.
Tags:
SQL
XML
I am working on a big project that needs to output multi-level nested XML. I'm running into an issue when trying to go past 2 levels.deep. The SELECT uses 4 different tables; one for each level. My question is: Is it best to use FOR XML PATH or FOR XML EXPLICIT when trying to create XML that is nested 4 deep? I know FOR XML PATH is much easier to work with, but the hierarchy levels don't work when using inner joins and using subqueries with separate FOR XML PATHs error after the 2nd level due to multi-level not binding. Does anyone have any examples of FOR XML PATH usage with 4+ tables? Thanks in advance, Chris


Software/Hardware used:
SQL Server 2008
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: