There are two forms: template-driven and mode-driven.
1. Template-driven
In the template-driven ING, the ing relationship between the document structure and the database structure is not pre-defined. Instead, the template embedding the command statement is used for data transmission middleware to process the template. For example, the following template embeds the SELECT statement in the <SelectStmt> element:
<? Xml version = "1.0"?>
<FlightInfo>
<Intro> The following flights have available seats: </Intro>
<SelectStmt> SELECT Airline, FltNumber, Depart, Arrive FROM
Flights </SelectStmt>
<Conclude> We hope one of these meets your needs </Conclude>
</FlightInfo>
When the data transmission middleware processes this document, each SELECT statement will be replaced by their respective execution results. The following XML format is obtained:
<? Xml version = "1.0"?>
<FlightInfo>
<Intro> The following flights have available seats: </Intro>
<Flights>
<Row>
<Airline> ACME </Airline>
<FltNumber> 123 </FltNumber>
<Depart> Dec 12,199 </Depart>
<Arrive> Dec 13,199 8 </Arrive>
</Row>
...
</Flights>
<Conclude> We hope one of these meets your needs </Conclude>
</FlightInfo>
This template-driven ING can be quite flexible. For example, some products allow you to replace the content you want in any result set (including using parameters in SELECT), rather than simply formatting the result as in the preceding example. It also supports programming for construction, such as loop and condition judgment structure. There are also some parameters that support the SELECT statement, such as passing parameters through HTTP.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service