XmlConnector, DataSet, and List trouble (v2 components)
Posted: 02-16-2005, 01:59 PM
refuses to untangle. I'm attempting to use an XMLConnector to read data into a
dataset, and then display that in a list box. The only thing displaying in the
list box is 'undefined.' These are the steps I've followed: 1. Drag
XMLConnector onto stage and name xmlConnect. 2. Switch to schema tag, select
the 'results : XML' object, and import the schema from the XML file. The schema
looks like this: results : XML + beneFacts : Object __+ list_item : Array ____+
[n] : Object ______name : String ______+ coverage : <empty> ________@type :
String ______keywords : String ______+ text : Object ________+ p : Array
__________[n] : String 3. Drag a DataSet component onto the stage and name
xmlDataSet. 4. Create a binding between xmlConnect.beneFacts.list_item and
xmlDataSet.dataProvider. The direction is set to 'in' from the dataset. 5. Drag
a List component onto the stage and name it ListBox. 6. Create a binding
between xmlDataSet.dataProvider and ListBox.dataProvider. The direction is set
to 'in' from the list. 7. Set the formatter on the binding between the dataset
and list to 'Rearrange Fields.' Set the formatter options to:
'label=name;data=.'. The XML used looks something like this: <?xml version =
'1.0'?> <benefacts> <list_item> <name>Other Random Disease</name>
<coverage type = 'partial' /> <keywords>alternate unknown
illness</keywords> <text> <p>This is a somewhat less generic unknown
illness.</p> <p>One might almost go so far as to call is specific.</p>
</text> </list_item> ... </benefacts> According to every tutorial I've
found on the Web, this should work just fine. Any ideas? Rys



Linear Mode


Posts: n/a