xmlHTTPTechnology:
--------------------------- --------------------------
1. Database remote management technology
Modern Internet-based wide area network An important part of the application is database remote monitoring. First, let’s briefly review the development process and methods of database remote management technology on the Internet:
In the early days, database remote management was carried out by writing CGI-BIN program modules. However, CGI-BIN runs slowly and is inconvenient to maintain. It has been basically abandoned now.
In recent years, there are many applications using componentObjectModel(Component Object Model, COM), and the effect is Very good too. But if a third-party server is used (the author's website is built on a third-party virtual host), the server often does not allow users to register their own components due to confidentiality or other commercial reasons. In recent years, the .NET platform launched by Microsoft and the J2EE platform of SUN are both very high-end database remote management and service platforms. Both can provide high-quality multi-tier (n-Tier) application services.
Among them, .NET's Simple Object Access Protocol (SOAP) uses Hypertext Transfer Protocol (HTTP) and Extensible Markup Language (XML) technologies to implement cross-system (such as Windows) - Linux) communication service method has been widely accepted and used by developers. Many large-scale applications, such as Enterprise Resource Planning (ERP), are built on such large-scale platforms.
But for small and medium-sized applications, such as the construction and maintenance of a website, this large-scale application platform seems a bit too big and the overhead is too huge.
Microsoft, which once lagged behind in Internet technology and Java technology, is leading the way in XML application development. The XMLHTTP protocol in her XML parser (MSXML) is a very convenient and practical client/service communication channel. The comprehensive use of XMLHTTP and ActiveX Data Objects (ActiveX Data Objects, ADO/ADOX) can easily and conveniently achieve remote database management.
This article introduces how to comprehensively use XMLHTTP and ADO/ADOX for remote database management.
2. Database remote management system
The task process of database remote management is:
1. The client sends a
query of database structure and data to the server
or Modify instructions. 2. The server accepts and executes relevant instructions and returns the results to the client. 3. The client accepts and displays the instruction execution results returned by the server.
The two main key links to realize remote database management are:
1. The data channel for uploading instructions and downloading results between the client and the server is implemented by the XMLHTTP protocol.
2. The instruction transmission and result return between the server front and the database are completed by the ADO/ADOX interface, which plays the role of the middle layer.
3. The use of XMLHTTP
As the name suggests, XMLHTTP is a hypertext transfer protocol that transmits data in XML format.
In fact, the data transmission process of XMLHTTP is more flexible:
The instructions it uploads can be XML format data, or
strings
, streams, or an unsigned Array of integers. It can also be a URL parameter. The result it delivers can be XML format data, a string, a stream, or an unsigned integer array. For details, please refer to the link at the end of the article.
The process for the client to call XMLHTTP is very simple. There are only 5 steps:
1.
Create XMLHTTP object
2. Open the connection with the server and define the instruction sending method. , service web pages (URL) and request permissions, etc. The client opens the connection with the server's service webpage through the Open command. Just like ordinary HTTP command transmission, you can use the "GET" method or the "POST" method to point to the service web page of the server.
3. Send instructions.
4. Wait for and receive the processing results returned by the server.
5. Release the XMLHTTP object
XMLHTTP method:
Open bstrMethod, bstrUrl, varAsync, bstrUser, bstrPassword
bstrMethod: Data transmission method, that is, GET or POST.
bstrUrl: URL of the service web page.
varAsync: Whether to execute synchronously. The default is True, which means synchronous execution, but synchronous execution can only be implemented in the DOM.
In applications, it is generally set to False, which means asynchronous execution.
bstrUser: User name, can be omitted.
bstrPassword: User password, can be omitted.
Send varBody
varBody: instruction set. It can be XML format data, a string, a stream, or an unsigned integer array. It can also be omitted and the directive is substituted through the URL parameters of the Open method.
setRequestHeader bstrHeader, bstrValue
bstrHeader: HTTP header (header)
bstrValue: HTTP header (header) value
If the Open method is defined as POST, you can define a form to upload:
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
XMLHTTPAttributes:
onreadystatechange: Obtain the return result in synchronous execution mode EventHandle. Can only be called in the DOM.
responseBody: The result is returned as an unsigned integer array.
responseStream: The result is returned as an IStream stream.
responseText: The result is returned as a string.
responseXML: The result is returned as XML format data.
The following is an application example in the source program attached to this article:
Function GetResult(urlStr)
Dim xmlHttp
Dim retStr
Set xmlHttp = CreateObject( "Msxml2.XMLHTTP") 'Create object
On Error Resume Next 'Error handling
xmlHttp.Open "POST", urlStr, False 'Open the connection in POST mode and execute it asynchronously.
xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" 'Upload form
xmlHttp.Send 'Send command
If Err.Number = 0 Then 'If Correct connection
retStr = xmlHttp.responseText 'Wait for and obtain the result string returned by the server
Else
retStr = "Url not found" 'Otherwise return an error message
End If
Set xmlHttp = Nothing 'Release Object
Getresult = Retstr' back result
END FUNCTION
## stetresult () function brought the URL parameter of the service webpage, and the uploaded instructions were placed on the parameters behind the URL. For example:
urlStr = "server.asp?cmd=" & cmd & "&db=" & db & "table=" & table
cmd: execution method, such as query, modification, deletion, etc.
db: server database name
table: server table name
Then submit the command, wait for and receive the returned processing results. The result is returned as a string.
Finally, the function caller processes and displays the result.
The above is the detailed content of Summary of XML related technical information. For more information, please follow other related articles on the PHP Chinese website!

XML has the advantages of structured data, scalability, cross-platform compatibility and parsing verification in RSS. 1) Structured data ensures consistency and reliability of content; 2) Scalability allows the addition of custom tags to suit content needs; 3) Cross-platform compatibility makes it work seamlessly on different devices; 4) Analytical and verification tools ensure the quality and integrity of the feed.

The implementation of RSS in XML is to organize content through a structured XML format. 1) RSS uses XML as the data exchange format, including elements such as channel information and project list. 2) When generating RSS files, content must be organized according to specifications and published to the server for subscription. 3) RSS files can be subscribed through a reader or plug-in to automatically update the content.

Advanced features of RSS include content namespaces, extension modules, and conditional subscriptions. 1) Content namespace extends RSS functionality, 2) Extended modules such as DublinCore or iTunes to add metadata, 3) Conditional subscription filters entries based on specific conditions. These functions are implemented by adding XML elements and attributes to improve information acquisition efficiency.

RSSfeedsuseXMLtostructurecontentupdates.1)XMLprovidesahierarchicalstructurefordata.2)Theelementdefinesthefeed'sidentityandcontainselements.3)elementsrepresentindividualcontentpieces.4)RSSisextensible,allowingcustomelements.5)Bestpracticesincludeusing

RSS and XML are tools for web content management. RSS is used to publish and subscribe to content, and XML is used to store and transfer data. They work with content publishing, subscriptions, and update push. Examples of usage include RSS publishing blog posts and XML storing book information.

RSS documents are XML-based structured files used to publish and subscribe to frequently updated content. Its main functions include: 1) automated content updates, 2) content aggregation, and 3) improving browsing efficiency. Through RSSfeed, users can subscribe and get the latest information from different sources in a timely manner.

The XML structure of RSS includes: 1. XML declaration and RSS version, 2. Channel (Channel), 3. Item. These parts form the basis of RSS files, allowing users to obtain and process content information by parsing XML data.

RSSfeedsuseXMLtosyndicatecontent;parsingtheminvolvesloadingXML,navigatingitsstructure,andextractingdata.Applicationsincludebuildingnewsaggregatorsandtrackingpodcastepisodes.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 English version
Recommended: Win version, supports code prompts!

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

SublimeText3 Linux new version
SublimeText3 Linux latest version