Using ITXML with Corda Embedder

Corda Server™ lets you stream a ITXML string in place of an Image Template file, or to append or override the Image Template file.

When doing this, the Web application (e.g., Java* Server Page or Active Server Page) sends data directly to Corda Server using the addITXML method. For example, streaming graph data might look something like the following:

myImage.addITXML("<cit:data><cit:column name='Arrivals'/><cit:column name='Departures'/><cit:column name='Unused'/><cit:column name='Out of Commission'/><cit:row name='Atlanta'><cit:data-item value='23.0'/><cit:data-item value='36.0'/><cit:data-item value='11.0'/><cit:data-item value='7.0'/></cit:row><cit:row name='Boston'><cit:data-item value='41.0'/><cit:data-item value='17.0'/><cit:data-item value='25.0'/><cit:data-item value='9.0'/></cit:row></cit:data>");

Streaming map data might look something like the following:

myImage.addITXML("<cit:map name="AU1"><cit:layer name="Background"><cit:map-shape name="Australian Capital Territory" value="560"/><cit:map-shape name="New South Wales" value="2300"/><cit:map-shape name="Northern Territory" value="410"/><cit:map-shape name="Queensland" value="5710"/><cit:map-shape name="South Australia" value="1920"/><cit:map-shape name="Tasmania" value="1672"/><cit:map-shape name="Victoria" value="7791"/><cit:map-shape name="Western Australia" value="4309"/></cit:layer><cit:layer name="Data Points"><cit:map-point name="Adelaide, Australia" value="23"/><cit:map-point name="Brisbane, Australia" value="78"/><cit:map-point name="Hobart, Tasmania" value="25"/><cit:map-point name="Melbourne, Australia" value="71"/><cit:map-point name="Perth, Australia" value="9"/><cit:map-point name="Sydney, Australia" value="52"/></cit:layer></cit:map>");

Note: The preceding examples added new ITXML to the Image Template file. To override ITXML, see ITXML Transformations. This method is particularly useful when generating ITXML data in the same Web page that contains the Corda® image.