setXML Property

Description

This property or the setXMLURL property must be set for Ephox EditLive! for Java to run.  However, these properties are mutually exclusive, so one, NOT both, should be set.

This property specifies the XML configuration text to be used by EditLive! for Java.  This text will customize the EditLive! for Java interface. To find out about how to use XML Configuration files, please read about the Configuration Tool.  The ConfigurationText is simply the text of a configuration file of your choice, but by using text instead of a file URL, it may make it easier for you to dynamically customize EditLive! for Java.  The XML text passed into EditLive! for Java must comply with the EditLive! for Java XML DTD file.

Syntax

JavaScript object.setXML(strXMLText)

Parameters

strXMLText Required.  A string containing the XML document that EditLive! for Java should use for configuration.  This string must be URL encoded.

Example

The following code passes in an XML document which will be used to customize EditLive! for Java.  The code uses the default JavaScript escape function to encode the document.  

Note:  

var editlivejava1;
editlivejava1 = new EditLiveJava("ELJApplet1","600","400");
editlivejava1.setXML(escape("<?xml version="1.0" encoding="ISO-8859-1"?> <editLiveForJava><document>...));

Remarks

Using the setXML property to configure EditLive! for Java results in a faster load time for the EditLive! for Java applet than is achieved through the use of the setXMLURL property.  

The string passed to the setXML property must be URL encoded or encoded using the JavaScript escape function. 

The setXML property is most useful when configuring EditLive! for Java dynamically.  Otherwise it is much easier to create an XML configuration file with the Ephox EditLive! for Java Configuration Tool and use this to configure EditLive! for Java using the setXMLURL property.

The setting of this property is mutually exclusive with that of the setXMLURL property.  One of these properties must be set before calling the show method.

See Also