I'm running into problems with my XML format when I generate it with SQL.
I'm using SQL Server 2005. I have a query that uses FOR XML PATH that will return XML for me but it does work well with the formatting.
I'm not a XML guru but when I apply a schema to the generated XML it's not picking up the squencing and just returns as if it was curning out rows.
So:
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
<note>
<to>Jim</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
What I'm looking for is something more like:
<note>
<to>Tove</to>
<to>Jim</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
I'm not sure what to do. I've been reading up and searching google but nothing has really stood out that makes a difference.
Thanks for the help in advance.
and remember:
"Don't torture yourself, let the life to do it for you."