using FOR XML

  • Thread starter Thread starter Buddy Ackerman
  • Start date Start date
B

Buddy Ackerman

I want to use FOR XML in my query so I'm going to use the ExecuteXmlReader
method? The trouble I'm having now is streaming the results to a string for
output as an XML document. Also, since the XML that comes from teh query is
not a complete document it's a fragment without a root element. So, any
ideas about ho to get his into a string?

--Buddy
 
Why not execute the command as normal, place the results in a dataset and
then use the dataset's .getXML() method to create a complete XML (well
formed) string?
 
I return the XML with a specific hierarchy that would be more difficult to
do using datasets.


--Buddy
 
Then you are going to need to create the missing pieces of the XML fragment
and write them into the XMLDocument manually.
 
Back
Top