# Change XML Variables on fly

**URL:** <https://forum.kirupa.com/t/change-xml-variables-on-fly/226911>\
**Category:** flash\
**Created:** [May 25, 2007, 12:43am UTC](https://forum.kirupa.com/t/change-xml-variables-on-fly/226911 "2007-05-25T00:43:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deltajam](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@deltajam](https://forum.kirupa.com/u/deltajam)\
**Post date:** [May 25, 2007, 12:43am UTC](https://forum.kirupa.com/t/change-xml-variables-on-fly/226911/1 "2007-05-25T00:43:26Z")

</div>

Ok. I want to re-use this XML object, but replace some of the variables inside it.

Is there an easy way to do this?

```auto

   var c_bg_xml:XML = 
        <Motion duration="" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*">
         <source>
          <Source symbolName="c_bg">
           <dimensions>
            <geom:Rectangle left="0" top="0" width="1000" height="230.05"/>
           </dimensions>
           <transformationPoint>
            <geom:Point x="0" y="0"/>
           </transformationPoint>
          </Source>
         </source>
         <Keyframe index="0" y="240">
          <tweens>
           <SimpleEase ease="1"/>
          </tweens>
         </Keyframe>
         <Keyframe index="20" y="0"/>
        </Motion>;

```

Would like to change the widths, heights, index and so on … do I really need to parse the xml object, place in my own variables and then re assemble? Hmm …
