I am speaking about XML namespaces.  If a node is <abc:MyNode>, then in the
e4 x expression you need to writhe myXML.abc::MyNode;  Or declare and use a
"Namespace"

 

The single node behavior suggests that you have left the resultFormat at its
default "object".  And that is why you are not seeing the namespace issue,
and why you are not able to use e4x expressions.

 

resultFormat="object" has a few benefits and many drawbacks.  I advise
against using it.  Look into this choice before you get too far to change.
Google or search the archives.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Jim
Sent: Monday, April 13, 2009 7:34 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Need help processing XML into Flex app

 






--- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
"Tracy Spratt" <tspr...@...> wrote:
>
> Have you solved the namespace issue? Do you understand what I am asking?
> 
I guess I don't. I did add this to my mx:application tag:
xmlns:ws="com.draper.*" and had
import "com.draper.*";
in my script section, but without those it still runs fine. 

After I sent you the note about looping through the array, I discovered that
Flex is seeing an array only if there are multiple occurrances. If there is
just one role, it treats it as a regular node, so no looping is required. So
my loop became:

roleList = "";
if (item.Roles.length == undefined) {
roleList = item.Roles.RoleName;
}
else {
for (i = 0; i < item.Roles.length; i++) {
roleList = roleList + item.Roles[i].RoleName + "\n";
}
}
return roleList;

Oh, and the reason I started looping was to add the line break; when I first
got results back, the values were just strung together like role1 role2
role3. 

Jim



Reply via email to