| Business Objects and Data Sources > Shelves and Cards > LEDs > Loading an LED Defined in XML |
Loading an LED Defined in XML |
INDEX
PREVIOUS
NEXT
|
This section shows how to load an LED from an XML file in a data source. For detailed information about data sources, see section Data Sources.
The following example extends the example in Loading a Shelf Defined in XML and adds an LED to a card. For details about the XML elements used in this example, see Table 3.1, Elements in an XML Data File.
<cplData> <addObject id="Shelf"> <class>ilog.tgo.model.IltShelf</class> <attribute name="name">Shelf</attribute> <attribute name="slotSizes" javaClass="ilog.cpl.equipment.IlpSlotSizes"> <width> <value>30</value> <value>20</value> <value>40</value> </width> <height> <value>90</value> <value>20</value> </height> </attribute> <attribute name="position" javaClass="ilog.cpl.graphic.IlpPoint"> <x>100</x> <y>50</y> </attribute> </addObject> <addObject id="Card"> <class>ilog.tgo.model.IltCard</class> <parent>Shelf</parent> <attribute name="name"></attribute> <attribute name="position" javaClass="ilog.cpl.graphic.views.IlpShelfItemPosition"> <x>0</x> <y>0</y> <width>3</width> <height>1</height> </attribute> </addObject> <addObject id="Led"> <class>ilog.tgo.model.IltLed</class> <parent>Card</parent> <attribute name="name">Led</attribute> <attribute name="type">Circular</attribute> <attribute name="position" javaClass="ilog.cpl.graphic.IlpRelativePoint"> <x>70</x> <y>65</y> </attribute> </addObject> </cplData>
The result looks like this:
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. All rights reserved. Legal terms. | PREVIOUS NEXT |