Re: [Flashcoders] XML and CData

2005-11-09 Thread Muzak
That's exactly what needs to be done.

Taking my previous xml example:



 
  
 
 
  
 
 
  
 
 
  
 


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" 
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


Re: [Flashcoders] XML and CData

2005-11-09 Thread Ron Wagner

Hi Tim,

I'm afraid I don't follow you here. Let me give an example and maybe  
you can elaborate a little.





1
2
1
yes, it works






Thanks,
Ron

On Nov 9, 2005, at 8:46 AM, Tim Beynart wrote:


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


RE: [Flashcoders] XML and CData

2005-11-09 Thread Tim Beynart
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


Re: [Flashcoders] XML and CData

2005-11-09 Thread Ron Wagner
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

On Nov 9, 2005, at 6:10 AM, Muzak wrote:

Make sure you set the correct parameters for the XMLConnector in  
the properties panel.


URL: path to xml file
direction: receive (send and receive will NOT work)
ignoreWhite: true

Call the .trigger() method on the XMLConnector instance to load the  
xml.


Other than the "space" bug it should work just fine.

regards,
Muzak


- Original Message -
From: "Ron Wagner" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Wednesday, November 09, 2005 7:10 AM
Subject: Re: [Flashcoders] XML and CData


I should add that with the space betwen the  and 

Re: [Flashcoders] XML and CData

2005-11-09 Thread Muzak
Make sure you set the correct parameters for the XMLConnector in the properties 
panel.

URL: path to xml file
direction: receive (send and receive will NOT work)
ignoreWhite: true

Call the .trigger() method on the XMLConnector instance to load the xml.

Other than the "space" bug it should work just fine.

regards,
Muzak


- Original Message - 
From: "Ron Wagner" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Wednesday, November 09, 2005 7:10 AM
Subject: Re: [Flashcoders] XML and CData


>I should add that with the space betwen the  and 

RE: [Flashcoders] XML and CData

2005-11-08 Thread Phil Douglas
Maybe something to do with the ignoreWhite parameter?

Phil Douglas
Flash Developer
direct:  +61 2 9024 2655
mobile:  0423 691 722
email:   [EMAIL PROTECTED]  

phone:   +61 2 9211 4344
fax: +61 2 9211 6566
web: massmedia.com.au   Massmedia
Studios

The information transmitted may be confidential, is intended only for
the 
person to which it is addressed, and may not be reviewed, retransmitted,

disseminated or relied upon by any other persons. If you received this 
message in error, please contact the sender and destroy any paper or 
electronic copies of this message. Any views expressed in this  
communication are those of the individual sender, except where the
sender 
specifically states otherwise. MassMedia Studios does not represent, 
warrant or guarantee that the communication is free of errors, virus 
or interference.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ron
Wagner
Sent: Wednesday, 9 November 2005 5:11 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] XML and CData

I should add that with the space betwen the  and 
>  
>  
>  
> 
>
> works, but
>
> 
> 
> 
> 
> 
> 
> 
>
> does not. Only difference being the space between  and  [CDATA. I can't find any requirement for there being a space before  
> a CDATA, so unless someone else knows that the space is required it  
> looks like a bug in Flash.
>
> Thanks,
> Ron
>
>
> On Nov 8, 2005, at 11:07 PM, Muzak wrote:
>
>> CDATA should be no problem, even for the schema.
>> It should be listed as String. Make sure your xml is valid.
>>
>> The following simple xml:
>>
>> 
>> 
>>  
>>   
>>  
>>  
>>   
>>  
>>  
>>   
>>  
>>  
>>   
>>  
>> 
>>
>> Looks like this when loaded as schema:
>>
>> <-> results : XML
>> <-> content : Object
>> <-> node : Array
>> <-> [n] : String
>>
>> regards,
>> Muzak
>>
>> - Original Message -
>> From: "Ron Wagner" <[EMAIL PROTECTED]>
>> To: "Flashcoders mailing list" 
>> Sent: Wednesday, November 09, 2005 2:03 AM
>> Subject: [Flashcoders] XML and CData
>>
>>
>>> Hi all,
>>>
>>> Using Flash 8 Pro.
>>>
>>> I am a little confused on whether or not Flash can import data in  
>>> a  CDATA through XML. I am just getting started with XML in
>>> Flash, so  not sure if it's something I am doing or not, but I  
>>> can get all my  data in my XML except what is in a CDATA. When
>>> loading the schema in  the Component Editor for an XMLConnector,  
>>> the elements with CDATA  data have type . The other
>>> elements have their proper types.
>>>
>>> I've Googled my butt off today and found some people say that  
>>> CDATA  is supported, some say it is not supported, some say it is
>>> only  supported on the way in and not the way out. What I'm  
>>> trying to do is  load data into an XMLConnector, then bind to a user
>>> interface  component such as a DataGrid, eventually with a  
>>> DataSet component in  between.
>>>
>>> Can CData be used through an XMLConnector? Do I have to do  
>>> things  manually via a new XML(), etc., or will even that not work?
>>>
>>> Thanks,
>>> Ron Wagner
>>
>>
>> ___
>> Flashcoders mailing list
>> Flashcoders@chattyfig.figleaf.com
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>

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

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


Re: [Flashcoders] XML and CData

2005-11-08 Thread Ron Wagner
I should add that with the space betwen the  and 
 
 
 


works, but









does not. Only difference being the space between  and [CDATA. I can't find any requirement for there being a space before  
a CDATA, so unless someone else knows that the space is required it  
looks like a bug in Flash.


Thanks,
Ron


On Nov 8, 2005, at 11:07 PM, Muzak wrote:


CDATA should be no problem, even for the schema.
It should be listed as String. Make sure your xml is valid.

The following simple xml:



 
  
 
 
  
 
 
  
 
 
  
 


Looks like this when loaded as schema:

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

regards,
Muzak

- Original Message -
From: "Ron Wagner" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Wednesday, November 09, 2005 2:03 AM
Subject: [Flashcoders] XML and CData



Hi all,

Using Flash 8 Pro.

I am a little confused on whether or not Flash can import data in  
a  CDATA through XML. I am just getting started with XML in
Flash, so  not sure if it's something I am doing or not, but I  
can get all my  data in my XML except what is in a CDATA. When
loading the schema in  the Component Editor for an XMLConnector,  
the elements with CDATA  data have type . The other

elements have their proper types.

I've Googled my butt off today and found some people say that  
CDATA  is supported, some say it is not supported, some say it is
only  supported on the way in and not the way out. What I'm  
trying to do is  load data into an XMLConnector, then bind to a user
interface  component such as a DataGrid, eventually with a  
DataSet component in  between.


Can CData be used through an XMLConnector? Do I have to do  
things  manually via a new XML(), etc., or will even that not work?


Thanks,
Ron Wagner



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



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



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


Re: [Flashcoders] XML and CData

2005-11-08 Thread Ron Wagner

Hi Muzak,

Very interesting... I plugged in your sample xml and it worked. After  
looking for significant differences between yours and mine, I found that




 
 
 
 


works, but









does not. Only difference being the space between  and [CDATA. I can't find any requirement for there being a space before a  
CDATA, so unless someone else knows that the space is required it  
looks like a bug in Flash.


Thanks,
Ron


On Nov 8, 2005, at 11:07 PM, Muzak wrote:


CDATA should be no problem, even for the schema.
It should be listed as String. Make sure your xml is valid.

The following simple xml:



 
  
 
 
  
 
 
  
 
 
  
 


Looks like this when loaded as schema:

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

regards,
Muzak

- Original Message -
From: "Ron Wagner" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Wednesday, November 09, 2005 2:03 AM
Subject: [Flashcoders] XML and CData



Hi all,

Using Flash 8 Pro.

I am a little confused on whether or not Flash can import data in  
a  CDATA through XML. I am just getting started with XML in
Flash, so  not sure if it's something I am doing or not, but I can  
get all my  data in my XML except what is in a CDATA. When
loading the schema in  the Component Editor for an XMLConnector,  
the elements with CDATA  data have type . The other

elements have their proper types.

I've Googled my butt off today and found some people say that  
CDATA  is supported, some say it is not supported, some say it is
only  supported on the way in and not the way out. What I'm trying  
to do is  load data into an XMLConnector, then bind to a user
interface  component such as a DataGrid, eventually with a DataSet  
component in  between.


Can CData be used through an XMLConnector? Do I have to do things   
manually via a new XML(), etc., or will even that not work?


Thanks,
Ron Wagner



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



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


Re: [Flashcoders] XML and CData

2005-11-08 Thread Muzak
CDATA should be no problem, even for the schema.
It should be listed as String. Make sure your xml is valid.

The following simple xml:



 
  
 
 
  
 
 
  
 
 
  
 


Looks like this when loaded as schema:

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

regards,
Muzak

- Original Message - 
From: "Ron Wagner" <[EMAIL PROTECTED]>
To: "Flashcoders mailing list" 
Sent: Wednesday, November 09, 2005 2:03 AM
Subject: [Flashcoders] XML and CData


> Hi all,
>
> Using Flash 8 Pro.
>
> I am a little confused on whether or not Flash can import data in a  CDATA 
> through XML. I am just getting started with XML in 
> Flash, so  not sure if it's something I am doing or not, but I can get all my 
>  data in my XML except what is in a CDATA. When 
> loading the schema in  the Component Editor for an XMLConnector, the elements 
> with CDATA  data have type . The other 
> elements have their proper types.
>
> I've Googled my butt off today and found some people say that CDATA  is 
> supported, some say it is not supported, some say it is 
> only  supported on the way in and not the way out. What I'm trying to do is  
> load data into an XMLConnector, then bind to a user 
> interface  component such as a DataGrid, eventually with a DataSet component 
> in  between.
>
> Can CData be used through an XMLConnector? Do I have to do things  manually 
> via a new XML(), etc., or will even that not work?
>
> Thanks,
> Ron Wagner


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


Re: [Flashcoders] XML and CData

2005-11-08 Thread Miles Thompson

At 09:03 PM 11/8/2005, you wrote:

Hi all,

Using Flash 8 Pro.

I am a little confused on whether or not Flash can import data in a
CDATA through XML. I am just getting started with XML in Flash, so
not sure if it's something I am doing or not, but I can get all my
data in my XML except what is in a CDATA. When loading the schema in
the Component Editor for an XMLConnector, the elements with CDATA
data have type . The other elements have their proper types.

I've Googled my butt off today and found some people say that CDATA
is supported, some say it is not supported, some say it is only
supported on the way in and not the way out. What I'm trying to do is
load data into an XMLConnector, then bind to a user interface
component such as a DataGrid, eventually with a DataSet component in
between.

Can CData be used through an XMLConnector? Do I have to do things
manually via a new XML(), etc., or will even that not work?

Thanks,
Ron Wagner
[EMAIL PROTECTED]



Ron,

I'm using this in MX 2004 to fetch the news for a given day from a MySQL 
database. feed_xml_story.php uses place CDATA tabs in the ouput stream so 
that the getNodes() function doesn't keep thinking that  or  are new 
XML tags.


function getStories(dtChosen)
{
var xmlReceiver:XML = new XML();
xmlReceiver.ignoreWhite = true;
var varSender:LoadVars = new LoadVars();
varSender.cacheKiller = new Date().getTime();
if( dtChosen == "" )
{
xmlReceiver.load( "http://"; + host + "feed_xml_story.php");
}
else
{

xmlReceiver.load( "http://"; + host + 
"feed_xml_story.php?dtDate="+ dtChosen);

}

//varReceiver.onLoad = function( )
xmlReceiver.onLoad = function( success:Boolean )
{

if (success)
{
// parse the content, getNodes comes from Steve 
Nelson's The Golden Mean.

arrHeads = getNodes( this, "head");
arrStorys = getNodes( this, "story");
displayContent(arrHeads);


} else
{
// Otherwise tell the user the vars couldn't be loaded.
txtNews.text = "Load failed.";
} // end if (succes ..
}


I do not have Pro, but found Steve Nelson's discussion of an RSS Reader at 
his The Golden Mean site v. clear. Here's the URL:

http://www.thegoldenmean.com/technique/rssReader01.html

Well worth a look - Miles Thompson


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