That's exactly what needs to be done.

Taking my previous xml example:

<?xml version="1.0" ?>
<content>
 <node label="node 1">
  <![CDATA[Node 1: Some cdata text.]]>
 </node>
 <node label="node 2">
  <![CDATA[Node 2: Some cdata text.]]>
 </node>
 <node label="node 3">
  <![CDATA[Node 3: Some cdata text.]]>
 </node>
 <node label="node 4">
  <![CDATA[Node 4: Some cdata text.]]>
 </node>
</content>

Which gives the following schema:

<-> results :  XML
    <-> content : Object
        <-> node : Array
            <-> [n] : String
                <-> @label : String

You can then have the following bindings:
You can bind the <-> node : Array to a dataProvider property of a List
You can bind the <-> [n] : String to a text property of a TextArea

If you then select the XMLConnector on stage, open the Bindings tab in the 
Component inspector.
There should be 2 entries:
results.content.node (bound to List)
results.content.node[n] (bound to TextArea)

When selecting the last one, at the bottom, there should be an entry saying:
Index for 'node' with a fixed value of '0'.
Select it and in the Bound Index dialog, unselect the "Use constant value" 
option.
Then select the List in the "Component Path" window on the left.
Select the 'selectedIndex' property as the "Schema Location" (right side 
window).

Last thing to do is to have an initial binding take place when xml is loaded.
For that to work, specify a default value for the selectedIndex of the List.

Select the List on stage.
Select the "Schema" tab in the "Component Inspector"
Select the "<-> selectedIndex : Number" property
At the bottom look for the "default value" entry. Fill in 0 as the value.

If this still doesn't work, send me your xml file and let me know which 
bindings you'd like to have.

kind regards,
Muzak

----- Original Message ----- 
From: "Tim Beynart" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" <flashcoders@chattyfig.figleaf.com>
Sent: Wednesday, November 09, 2005 2:46 PM
Subject: RE: [Flashcoders] XML and CData


Not the best workaround, but why not just use the parent node for yout
HTML tags as your string? What is the issue with the child nodes being
read as nodes?


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron
Wagner
Sent: Wednesday, November 09, 2005 7:37 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] XML and CData

The ignoreWhite is set to true. I have four other fields which are
integers, all coming through fine so I know the XMLConnector is setup,
being triggered, and otherwise working ok. If I remove the CDATA from
the xml and send it through as text it comes through fine.
The problem is I know my data will have some html mixed in so I really
need the CDATA around it.

Any other ideas are more than welcome.

Thanks,
Ron


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to