If you have two servers, you can exchange Access database data on both servers. Today, we made a remote interface to return the data in the MDB in XML form. The main idea is to populate the XML DOM with the Save method of the Recordset object, but this method produces XML that is not concise enough to produce XML that contains schema information that describes what nodes and attributes are allowed in the XML and what data types are used , and the data nodes also add namespaces. Schema information may be useful where data validation is required or more complex processing, but, in most cases, we are using thin clients and we do not need schema information. We can use XSLT to isolate the information we want, and remove the unwanted information.
The code is as follows:
<%
' Generate XSL Style
str = chr (&CHR) &CHR (9)
xslt= "<?xml version=" "1.0" "?>" & Chr (a) &CHR (Ten) & "<xsl:stylesheet version=" "1.0" "" _
& "Xmlns:xsl=" "Http://www.w3.org/1999/XSL/Transform" "" _
& "xmlns:s=" "uuid:bdc6e3f0-6da3-11d1-a2a3-00aa00c14882" "" _
& "xmlns:dt=" "uuid:c2f41010-65b3-11d1-a29f-00aa00c14882" "" _
& "xmlns:rs=" "Urn:schemas-microsoft-com:rowset" "" _
& "xmlns:z=" "#RowsetSchema" ">" & str_
& "<xsl:output omit-xml-declaration=" "Yes" "/>" &str_
& "<xsl:template match="/">" & STR&CHR (9) _
& "<xsl:element name=" "xml" ">" & STR&CHR (9) &CHR (9) _
& "<xsl:for-each select=" "/xml/rs:data/z:row" ">" & STR&CHR (9) &CHR (9) &CHR (9) _
& "<xsl:element name=" "Row" ">" & STR&CHR (9) &CHR (9) &CHR (9) &CHR (9) _
& "<xsl:for-each select=" "@*" ">" & STR&CHR (9) &CHR (9) &CHR (9) &CHR (9) &CHR (9) _
& "<xsl:element name=" "{Name ()}" ">" & STR&CHR (9) &CHR (9) &CHR (9) &CHR (9) &CHR (9) &CHR (9) _
& "<xsl:value-of select=" "." /> "& STR&CHR (9) &CHR (9) &CHR (9) &CHR (9) &CHR (9) _
& "</xsl:element>" & STR&CHR (9) &CHR (9) &CHR (9) &CHR (9) _
& "</xsl:for-each>" & STR&CHR (9) &CHR (9) &CHR (9) _
& "</xsl:element>" & STR&CHR (9) &CHR (9) _
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.