How to use Xqi?

Source: Internet
Author: User
As a communications medium, XQI (extensible Query Interface) is a service that allows you to use XML to remotely query and insert a database.
XQI allows remote queries and inserts to use search engines, but does not require CGI applications (data can be passed through other applications).

Example one: Query "Apple" in "Tree"

<?xml version= "1.0"?>
<GOXML>
<QUERY>
<KEYWORD>apple</KEYWORD>
<TAG>tree</TAG>
</QUERY>
</GOXML>

Looking for "apple" in "tree" will be done, you can get results in the form:

<?xml version= "1.0"?>
<query type= "URL" hits= "1" tag= "tree" >
<KEYWORDS>
<WORD>APPLE</WORD>
</KEYWORDS>
<word position= "0" wordcount= "5" >APPLE</WORD>
<URL>http://www.eden.org/fruit/forbidden.xml</URL>
<desription>forbidden fruit</description>
<SYNOPSIS>...</SYNOPSIS>
</HIT>
</QUERY>

Example two: Query and "Apple" related to the tag

<GOXML>
<QUERY>
<KEYWORD>apple</KEYWORD>
</QUERY>
</GOXML>

Can get the tag associated with "Apple"

<GOXML>
<query type= "TAG" keyword= "APPLE" >
<HIT>
<TAGNAME>tree</TAGNAME>
</HIT>
<HIT>
<TAGNAME>fruit</TAGNAME>
</HIT>
</QUERY>
</GOXML>

Example three: inserting

<?xml version= "1.0"?>
<GOXML>
<RESOURCE>
<HREF>http://www.tree.org/orange.xml</HREF>
<description>brief character description.</description>
<category>category text</category>
</RESOURCE>
</GOXML>

Insert Below

<?xml version= "1.0"?>
<GOXML>
<insert id= "321" status= "QUEUED" >
<URL>http://www.tree.org/orange.xml</URL>
<description>150 character description.<./description>
</INSERT>
</GOXML>



Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.