Hello list,

i make the following query on an xml file to retrieve a list with certain node names:

var tXML:XML = <data>
<findname_H1><[EMAIL PROTECTED]></findname_H1>
<findname_H2><[EMAIL PROTECTED]></findname_H2>
</data>

var pat:RegExp = new RegExp('findname' , 'i')
var tList:XMLList = tXML.*.(pat['test'](name()))

This works fine, but know i would like to in addition to finding them also remove the 'findname_'

I could use this:

var tList:XMLList = tXML.*.(pat['test'](name())).(editNodeName(name()))

function editNodeName(tObj:String):void{
        trace('-> ',tObj);
}

And then create a new XMLlist with custom nodes. But how do I access the currentNode in the query instead of the name().
Or is it possible to directly do a regExp replace on the node?

Thnx

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

Reply via email to