libXmlRequest Library

SPEC-1.5.1.0909.2005

Version: SPEC-1.5.1.0909.2005.
Download: libXmlRequest.js.
Demonstration: Example Suite. Also refer to example at the bottom of this page.

Note: 2006/01/29. Some Application Servers including Perl and PhP expect XML Posts to be set with a specific content type. The default encoding for version SPEC-1.5.1.0909.2005 is "text/xml". It may be necessary to specify "application/x-www-form-urlencoded" or "multipart/form-data" for posted XML data to be interpreted on the server. The content type can be changed by setting the content_type (org.cote.js.xml.content_type) property in the libXmlRequest file.

The Example Suite for this version serves as a decent stress test (similar to the following Example #3). Refer to the XML Utility Example #2 and XML Utility Example #3 (Engine for Web Applications) for further examples of the cache and pool features.

The libXmlRequest.js script file contains all of the procedures used by the examples available on this page. The sample_data.xml XML file is used for demonstration data. To make use of this library, copy the libXmlRequest.js file to your server or local machine, and reference it from a particular web page. For example: <script type="text/javascript" src="libXmlRequest.js"></script>

The XmlRequest library contains a two public request functions, getXml and postXml, that may be used to send synchronous and asynchronous XML Http requests from Internet Explorer and Mozilla. The syntax for each function follows.

Example: var oXml = getXml("sample_data.xml");

The following property accessors are exposed:

In addition, the following utility functions are provided.

Example:
var oXml = getXml("sample_data.xml");
var aNodes = selectNodes(oXml,"/sample-data-root/the-data",oXml.documentElement);

<!-- BEGIN -->

[ demo data will go here ]

<!-- END -->