title: Including configuration files while compiling a Flex application with MXMLC
body: <p>I'm using:
  - Flex SDK 3.5.0
  - Parsley 2.2.2.
  - Flash Builder 4</p>
  
  <p>Down in my src folder (which is configured as part of the source path in the Flash Builder), I have a logging.xml which I configure via Parsley:</p>
  
  <pre><code>            FlexLoggingXmlSupport.initialize();
          XmlContextBuilder.build("com/company/product/util/log/logging.xml");
  </code></pre>
  
  <p>When I run my application through Flash Builder, the XmlContentBuilder seems to locate the logging.xml (the implementation is a regular URLLoader one).</p>
  
  <p>When I compile my application using MXMLC (whether in Ant or command-line), and then run the swf, I get the following error:</p>
  
  <p>Cause(0): Error loading com/company/product/util/log/logging.xml: Error in URLLoader - cause: Error #2032: Stream Error. URL: file:///C|/workspace/folder01/product/target/com/company/product/util/log/logging.xml - cause: Error #2032: Stream Error. URL: file:///C|/workspace/folder01/product/target/com/company/product/util/log/logging.xml</p>
  
  <p>Here is the MXMLC tag in Ant:</p>
  
  <pre><code>        &lt;mxmlc file="${product.src.dir}/com/company/product/view/Main.mxml" output="${product.target.dir}/${product.release.filename}" keep-generated-actionscript="false"&gt;
          &lt;load-config filename="${FLEX_HOME}/frameworks/flex-config.xml" /&gt;
  
          &lt;!-- source paths --&gt;
          &lt;source-path path-element="${FLEX_HOME}/frameworks" /&gt;
          &lt;compiler.source-path path-element="${product.src.dir}" /&gt;
          &lt;compiler.source-path path-element="${product.locale.dir}/{locale}" /&gt;
  
          &lt;compiler.library-path dir="${product.basedir}" append="true"&gt;
              &lt;include name="libs" /&gt;
          &lt;/compiler.library-path&gt;
  
          &lt;warnings&gt;false&lt;/warnings&gt;
          &lt;debug&gt;false&lt;/debug&gt;
      &lt;/mxmlc&gt;
  </code></pre>
  
  <p>And here is the command line:</p>
  
  <pre><code>\mxmlc.exe -output "C:\temp\Rap.swf" -load-config "C:\Program Files\Adobe\Adobe Flash Builder 4 Plug-in\sdks\3.5.0\frameworks\flex-config.xml" -source-path "C:\Program Files\Adobe\Adobe Flash Builder 4 Plug-in\sdks\3.5.0\frameworks" C:\workspace\folder01\product\src C:\workspace\folder01\product\locale\en_US -library-path+=C:\workspace\folder01\product\libs -file-specs C:\workspace\folder01\product\src\com\company\product\view\main.mxml
  </code></pre>
  
  <p>Now perhaps I don't get this correctly, but as far as I understand the SWF should be compiled with all of the resources in the paths I give MXMLC as source-paths. For some reason it seems that the XML file is not compiled into the SWF, hence the relative path of the XmlContentBuilder isn't located successfully.</p>
  
  <p>I could not find any argument to provide the MXMLC with that might solve this.</p>
  
  <p>I tried using the -dump-config option with the Flash Builder's compiler, then giving that configuration to MXMLC, but it didn't work either.</p>
  
  <p>I tried providing the XmlContentBuilder with an absolute path. That worked fine when I compiled with MXMLC via Ant, but still didn't work when I used MXMLC in the command-line...</p>
  
  <p>I'd be happy to be enlightened here, regarding all subjects - using MXMLC, accessing resources with relative paths, configuring logging in Parsley, etc.</p>
  
  <p>Many thanks in advance,
  Daniel </p>