need to provide a more concise example? I have never had a question go
unanswered for so long. Any help is greatly appreciated.
Thanks,
Ben
--- In [email protected], "ben.clinkinbeard"
<[EMAIL PROTECTED]> wrote:
>
> Hello, I am having some strange issues moving from B2 to B3 that I
> can't seem to find dosumented anywhere. It seems that the objects
> created from my WS results are being parsed differently. For instance,
> here is some return xml.
>
> <Client>
> <EnterpriseId>99999</EnterpriseId>
> <ClientName>Film Ltd.</ClientName>
> <Plans>
> <Plan>
> <PlanNumber>55555</PlanNumber>
> <PlanName>RETIREMENT SAVINGS PLAN</PlanName>
> </Plan>
> </Plans>
> </Client>
>
> Depending on the data, there can sometimes be multiple Plan nodes. My
> code in B2 to check and deal with this was:
>
> if(obj_data.Plans.Plan.PlanNumber != null)
> {
> str = obj_data.Plans.Plan.PlanNumber;
> }
> else
> {
> var i:Number = 0;
> while(obj_data.Plans.Plan[i] != null)
> {
> str += (str.length > 0) ? "\n" : "";
> str += obj_data.Plans.Plan[i].PlanNumber;
> i++;
> }
> }
>
> but in B3 that throws an error. Something about obj_data.Plans.Plan
> being undefined. In B3 I have to change the code to:
>
>
> if(obj_data.Plans.length == 1)
> {
> str = obj_data.Plans[0].PlanNumber;
> }
> else
> {
> var i:Number = 0;
> while(obj_data.Plans[i] != null)
> {
> str += (str.length > 0) ? "\n" : "";
> str += obj_data.Plans[i].PlanNumber;
> i++;
> }
> }
>
>
> I am also having problems displaying WS results in other places in my
> app. Did something change in B3 concerning how XML and/or WS responses
> are parsed into objects?
>
> Thanks,
> Ben
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
| Web site design development | Computer software development | Software design and development |
| Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

