Hi,
Some days ago I had asked a question about filtering on child's
attribute for elements of
which some of those children are missing. the xml I used was:
var employees:XML =
<employees>
<employee name="joe mark">
<department id="id1"/>
<address city="miami" state="florida"/>
</employee>
<employee name="sandra morey">
<address city="san francisco"
state="california"/>
</employee>
<employee name="mary dooley">
<department id="id1"/>
<address city="los angeles"
state="california"/>
</employee>
</employees>
Note here that the second employee record doesnt have department
element at all.
Now I am trying to filter it the otherway around, ie., In the above
xml definition I want all the "employee" elements for which the
"department" child element is missing. Therefore I want the employee
with name "sandra morey" above.
I tried all these expressions to no avail:
var noDeptEmployees:XMLList = employees.employee.(child("department")
== null);
var noDeptEmployees:XMLList = employees.employee.(child("department")
== "");
var noDeptEmployees:XMLList = employees.employee.(department ==
null);//throws error.
var noDeptEmployees:XMLList =
employees.employee.(child("department")[EMAIL PROTECTED] == null);
var noDeptEmployees:XMLList =
employees.employee.(child("department")[EMAIL PROTECTED] ==
"");
What is the e4x _expression_ to get employee elements without department's.
thanks in advance for the answer.