How do i add a function in as to xml

I have defined my xml tags in as3 as well created a function. How wuld i add the function to the xml tag. For exame the function ia a goto and stop at a variable frame witch will be defined in the xml. So whayever input in the xml tag will be the frame label. I juat dont know how to add tha function to the xml declaration in as3. Thnks