Convert the XML to a string.
Do the regExp replace on the string.
Reparse the XML?
e.g.
var str:String=xml.toXMLString();
// do replacement here...
xml=new XML(str);
Might not be the fastest in the world, depending on the amount of XML
you are parsing, but it'll do the job.
HTH,
Ian
On Thu, Oct 9, 2008 at 5:56 PM, Jiri Heitlager
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have this xml file that I would like to filter on a certain string
> $$lang$$ and I was wondering
> if it is possible in one go using regExp instead of looping through an
> XMLList
>
>
> var conf:XML = <config>
> <assets>
> <asset id="chapter1" path="assets/$$lang$$/chapter1.swf" />
> <asset id="chapter2" path="assets/$$lang$$/chapter2.swf" />
> <asset id="chapter3" path="assets/$$lang$$/chapter3.swf" />
> <asset id="chapter_$$lang$$"
> path="assets/$$lang$$/chapter4.swf" />
> </assets>
>
> </config>
>
> I know it is possible to do inline functions but could get the current node
> and then replace the text
>
> var processed:XMLList = conf..*.(test(attributes()) );
> function test(tValue:Object):void
> {
> trace('called' , tValue)
> }
>
>
> In this case how do I get acces to the current XMLList and change the
> $$lang$$ for another string
>
> Hope somebody can help me out.
>
> Jiri
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders