# Flex loading relative to application root?

**URL:** <https://forum.kirupa.com/t/flex-loading-relative-to-application-root/295998>\
**Category:** flash\
**Created:** [September 8, 2009, 2:42pm UTC](https://forum.kirupa.com/t/flex-loading-relative-to-application-root/295998 "2009-09-08T14:42:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![the\_lar](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@the\_lar](https://forum.kirupa.com/u/the_lar)\
**Post date:** [September 8, 2009, 2:42pm UTC](https://forum.kirupa.com/t/flex-loading-relative-to-application-root/295998/1 "2009-09-08T14:42:06Z")

</div>

Hi all,

I’m working locally on a Flex app and struggling with relative paths.

My application has a xml folder at the root level in which all my config files are stored. Now if I load an xml file, say xml/config.xml, I have to declare the path as …/xml/config.xml because it’s relative to the src folder. When I deploy the app the path will be different of course but I don’t want to have to keep changing the path I just want to load files relative to the server root, i.e. /xml/config.xml - how do I do this for it to work both locally and on the webserver? I guess one way would be to have my xml directory inside the src folder but that seems klunky.

Many thanks  
Lar
