HTML 4.01 strict HTML
Visit Sourceforge.net

General TabLoading External XML via a ProxySaving and Retrieving XML to the Client's Hard DriveEscaping XML into Valid HTML
General Load XML Save XML Escape XML

XML for <SCRIPT> includes a number of tools that make development easier.

The Sample Code (Tools) pages have the following structure:

General: Introduction and layout of the Tools Sample Code
Load XML: Loading XML from websites outside your domain
Save XML: Saving and Retrieving XML to the client's hard drive via cookies
Escape XML: Escaping XML into Valid HTML and Back

These tools make it both possible and easy to extract, save and manipulate XML from a variety of data sources. The xmlIOLoadXMLViaProxy functions described in the Load XML tab are particularly useful for getting and manipulating data such as RSS news feeds that originate outside of your domain.

For a more in-depth overview of XML for <SCRIPT>, you are highly encouraged to look at the source code for these example applications. These example applications demonstrate "real life" usage of the tools and give a very good overview of the capabilities of the code.

Loading XML

In many cases, it is useful to load XML from another file on your web server or from another web server entirely and manipulate it with XML for <SCRIPT>. With JavaScript, the former is possible with a little effort. However, the latter is impossible due to the JavaScript security sandbox your code must live in. This makes it impossible, for example, to load and manipulate an external RSS news stream directly from JavaScript.

XML for <SCRIPT> attempts to make both loading files from your server and from external servers both possible and simple. It does this by abstracting the many different methods for browser-server communications in a simple-to-use API. To allow for XML to be loaded from external domains, XML for <SCRIPT> provides a number of server-side proxies that load the external XML on behalf of the JavaScript and returns it to the browser in such a manner that reading and manipulation is possible. See the documentation for more details on the implementation of this feature.

NOTE: SourceForge.net does not allow outbound connections from their hosting servers. Sadly, this makes it impossible to demonstrate XML for <SCRIPT>'s proxies from the SourceForge hosting environment. If you would like to see this tool in action, please download and install one of XML for <SCRIPT>'s available proxies to your own web server and run the xmlIOProxy Test Suite from that machine.

For your convenience, you may also download the Java Proxy Reference Implementation (available from the download page) to quickly set up an environment for the demonstration of this tool.

You may find more information about XML for <SCRIPT>'s available proxies and the Java Proxy Reference Implementation in the TOOLS tab of the documentation page.

This limitation is specific to SourceForge only, and is not a limitation of the proxy in any way.

Saving and retrieving XML

In many instances, it is nice to be able to save an XML stream onto a client's hard drive. Sadly (or thankfully, depending on your perspective) this is made difficult if not impossible to do by the browsers. Each browser does have methods allowing this type of activity, but these methods are not cross platform and can raise serious security concerns with users.

XML for <SCRIPT> attempts to resolve this situation by providing an interface for saving, retrieving and listing XML streams using cookies. This interface allows programmers to save data for a specified period of time and retrieve that data when needed. This technique works both in on-line and off-line mode thus allowing applications to function even when a user is away from the network. It is not a requirement to save XML, any string data is supported by the interface.

For an example of the functionality provided by this interface, click the button below and see the documentation under the MISC tab.

NOTE: If you are using Konqueror, you will need version 3.03 or higher to use these functions. Opera users must use Opera 7 or higher.

Escaping XML into valid HTML

Escaping XML into valid HTML can be an error prone and expensive process. The escaped HTML is very difficult to read with the human eye and is much larger than the original XML source.

XML for <SCRIPT> attempts to resolve this situation by converting your XML into valid HTML not by escaping the XML, but by replacing the XML markup tags with high ascii characters which are not likely to be found in your XML data.

For an example of the functionality provided by this interface, click the button below and see the documentation under the TOOLS tab. This example is very useful if you have XML that you wish to hard code into HTML and place on your web page.