13.07.2015 Views

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table 8-2: Properties of the SqlXmlCommand ClassPropertyBasePathClientSideXmlCommandStreamCommandTextCommandTypeNamespacesOutputEncod<strong>in</strong>gRootTagSchemaPathXslPathDescriptionGets or sets the base path used to resolve an XSLfile (XslPath property), a mapp<strong>in</strong>g schema file(SchemaPath property), or any other externalschema reference <strong>in</strong> an <strong>XML</strong> template.Boolean property, <strong>in</strong>dicates that the conversion of therowset to <strong>XML</strong> should occur on the client <strong>in</strong>stead ofon the server.Gets or sets the <strong>in</strong>put stream <strong>for</strong> the command. Usethis property to execute a command from a file (<strong>for</strong>example, a template or an Updategram).CommandStream and CommandText are mutuallyexclusive; if you set CommandStream,CommandText is automatically set to null.Gets or sets the text of the command to execute.CommandText and CommandStream are mutuallyexclusive; if you set CommandText,CommandStream is automatically set to null.Identifies the type of the command you want toexecute. Feasible values are def<strong>in</strong>ed <strong>in</strong> theSqlXmlCommandType enumeration.Enables the execution of XPath queries that usenamespaces.Specifies the encod<strong>in</strong>g <strong>for</strong> the stream that is returnedwhen the command executes. UTF-8 is the defaultencod<strong>in</strong>g.Gets or sets the name of the root element <strong>for</strong> <strong>XML</strong>generated by command execution. Set to by default.Gets or sets the name of the mapp<strong>in</strong>g schema <strong>for</strong>XPath queries. The path can be absolute or relative.If relative, the BasePath property is used to resolvethe path.Gets or sets the name of the XSL file to use <strong>for</strong> <strong>XML</strong>data trans<strong>for</strong>mations. The path can be absolute orrelative.Streams play a key role <strong>in</strong> the SqlXmlCommand class. Not only can you use a streamto specify the <strong>in</strong>put of a command, but you can also pick up the results of the commandfrom an output stream. You can also control the encod<strong>in</strong>g of this output stream. For abetter understand<strong>in</strong>g of these properties, review the ADO example about Updategrams<strong>in</strong> the section "Submitt<strong>in</strong>g Commands Through Updategrams," on page 383.Supported Command TypesTheSqlXmlCommand class can execute a variety of commands. The allowablecommand types are def<strong>in</strong>ed <strong>in</strong> the SqlXmlCommandType enumeration and are shown<strong>in</strong> Table 8-3.316

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!