e4x expression tool and examples

I like Flex, but being a big fan of XSLT and XPath, E4X drives me mad – to me the notation is clunky and counter intuitive (compared to XPath), though I do concede that may be because of what I learned first.

I don’t find myself using non-trivial E4X expressions quite often enough for it all to become second nature … so I find this online e4x expression tool very useful.

While I’m making a note-to-self on the subject of e4x, I have just (re)established, that if you want to find a list of nodes which have at least one non-empty descendent of a certain type, the expression is of the form:

a.b.c.(d.e.(text().length()>0).length() > 0)

I’m not seeing a lot of lists of e4x examples out there, so I’ll try to remember to add further e4x examples as comments to this post – and please feel free to do the same!

kdw

Leave a Reply

Search
Categories