Re: Well Formed XML not returned using FOR XML (<?xml version="1.0"?>)

Tech-Archive recommends: Fix windows errors by optimizing your registry



bqsoftware wrote:
The xml that is returned using FOR XML does not return well formed XML. The xml header for example "<?xml version="1.0"?>" is missing.

Query: Select count(*) from dxcg_jobs FOR XML RAW, ELEMENTS
Result: <row>4</row> (Not well formed)

The XML declaration is optional for XML version 1.0 and encoding UTF-8 and UTF-16 so that snippet above can be well-formed without having an XML declaration.


--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
.



Relevant Pages