The code was based on your example and therefore we know the XML schema, i.e. we know the node name and they all have the attribute "title".

If we don't know anything about the XML we could do something like:

var xmlListSearch:XMLList = test..*.(re["test"](attribute("*")) || re["test"](child("*")));

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Merrill, Jason wrote:
Thanks.  However, I have been told using @title is not good in most
situations because it will return an error if a node doesn't have the
attribute, wheras attribute("title") will not.

Also this is shorter:
var xmlListSearch:XMLList = test..topic.(re.test(@title));

But you still need to specify what XML to search through, no?  How would
the above know what XML object topic is within using the code above?

Jason Merrill
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to