How do I update an xml file with msbuild with two namespaces?

Posted by c3rin on Stack Overflow See other posts from Stack Overflow or by c3rin
Published on 2010-06-08T04:45:49Z Indexed on 2010/06/08 4:52 UTC
Read the original article Hit count: 300

Filed under:
|

This msbuild below task can take into account one namespace, but in the case where I'm updating an mxml (flex) that has a mix of namespaces, can I use this task or another msbuild task to do the update?

<XmlUpdate
        Prefix="fx"
        Namespace="http://ns.adobe.com/mxml/2009"
      XmlFileName="myFlexApp.mxml"
      Xpath="//mx:Application/fx:Declarations/fx:String[@id='stringId']"
      Value="xxxxx">

Here is the flex xml I'm trying to update:

<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
            xmlns:mx="library://ns.adobe.com/flex/mx" 
            xmlns:s="library://ns.adobe.com/flex/spark">
<fx:Declarations>
    <fx:String id="stringId">UPDATE_ME</fx:String>
</fx:Declarations></mx:Application>

© Stack Overflow or respective owner

Related posts about msbuild

Related posts about flex4