XML Root Property

ADO and SQL Server

ADO and SQL Server

XML Root Property

The XML Root property provides a root tag in which the query result is wrapped to return a well-formed document.

Applies To
Command Object
Syntax

object.Properties("XML Root") [= value]

Parts

object

Expression that evaluates to an object in the Applies To list.

value

String that contains the root tag.

Data Type

adBSTR

Modifiable

Read/write

OLE DB Property

SSPROP_STREAM_XMLROOT

Remarks

FOR XML and XPath queries return results in the form of document fragments, which cannot be loaded into a browser. Use the XML Root property to wrap the result set so that it can be loaded into DOM, or viewed in a browser. The result returns the XML Declaration, <?xml version="1.0"?>, in the output.

SQL ISAPI supports the keyword 'root', which maps to the XML Root property.

See Also

Base Path Property

Content Type Property

Mapping Schema Property

SS STREAM FLAGS Property

URL Access

XSL Property