Re: Is there a way to use filtering in E4X with hyphenated XML elements?
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Fri, 23 Jan 2009 16:36:43 +0100
ten8ciousb wrote:
With E4X, I can filter the results, saying I want a list of employees
where the value of company_name is "DUNDER MIFFLIN" like
var employees = phoneList..row.(company_name == "DUNDER
MIFFLIN").EMPLOYEE-NAME;
However, if the element contains a hyphen instead of an underscore,
i.e. company-name, that syntax won't work.
this: var employees = phoneList..row.(company-name == "DUNDER
MIFFLIN").EMPLOYEE-NAME;
results in a reference error name is undefined.
What I wanted to know is if there was a syntax in E4X for this type of
filtering with elements containing hyphens.
If I understand your response correctly, the answer is "No. But,
there are other ways to do it."
phoneList..row.descendants("COMPANY-NAME")
See ECMA-357. HTH and let us know your solution, please.
PointedEars
.
- References:
- Is there a way to use filtering in E4X with hyphenated XML elements?
- From: ten8ciousb
- Re: Is there a way to use filtering in E4X with hyphenated XML elements?
- From: Thomas 'PointedEars' Lahn
- Re: Is there a way to use filtering in E4X with hyphenated XML elements?
- From: ten8ciousb
- Is there a way to use filtering in E4X with hyphenated XML elements?
- Prev by Date: Re: Get POSTed form values
- Next by Date: Re: Cross-Browser onmousedown JavaScript
- Previous by thread: Re: Is there a way to use filtering in E4X with hyphenated XML elements?
- Next by thread: Re: Is there a way to use filtering in E4X with hyphenated XML elements?
- Index(es):
Relevant Pages
|
Loading