# Edit XML File Action Question

**URL:** https://www.finalbuilder.com/forums/t/edit-xml-file-action-question/279
**Category:** Discussion
**Created:** [December 7, 2006, 10:07am UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-action-question/279 "2006-12-07T10:07:04Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [December 7, 2006, 10:07am UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-action-question/279/1 "2006-12-07T10:07:04Z")

</div>

I am trying to use the Edit XML File action to edit a Visual Studio 2005 Web Deployment Project. I cut and pasted the file below. I want to edit the four AssemblyAttributes so that the AssemblyVersion and AssemblyFileVersion are the same using a Script Variable. I can get to the first node using the following XPath

/a:Project/a:ItemGroup/a:AssemblyAttributes/a:Value

and change the value to the Script Variable. What I cannot figure out is how to get to the other three. My ultimate aim is to have the AssemblyVersion and AssemblyFileVersion for the DLLs that are created to all have the same number that reflects my custom Major.Minor.BuildDate.BuildNumber. Any suggestions?

http://schemas.microsoft.com/developer/msbuild/2003"\>  
  
 Debug  
 AnyCPU  
 8.0.51103  
 2.0  
 {681F6585-8932-467C-B710-A35AC2270C7F}  
 ..\Project1\_UI  
 {7AB5D0FA-A8BE-4822-AEF9-EF55E47520D4}|C:\Projects\FinalBuilder\Project1\_Solution\Project1\_UI  
 /Project1\_UI  
  
  
 true  
 .\Debug  
 true  
 true  
 Project1\_UI  
  
  
 false  
 .\Release  
 true  
 true  
 Project1\_UI

**4.0.0.0**  
  
  
 **4.0.0.0**  
  
  
  
  
 **3.0.0.0**  
  
  
 **3.0.0.0**

---

<div class="post-metadata">

### Author: ![angus](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@angus](https://www.finalbuilder.com/forums/u/angus)
#### Post date: [December 7, 2006, 11:14am UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-action-question/279/2 "2006-12-07T11:14:23Z")

</div>

Hi Bob,  
  
Unfortunately, our forum software doesn’t play nice with embedded tags. If you click the Add Reply button, then go down to the “Attach Files” section, then you can attach the actual XML file to the post.  
  
Regards,  
  
  
Angus

---

<div class="post-metadata">

### Author: ![paulsamways](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/p/e8c25b/32.png) [@paulsamways](https://www.finalbuilder.com/forums/u/paulsamways)
#### Post date: [December 7, 2006, 11:53am UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-action-question/279/3 "2006-12-07T11:53:31Z")

</div>

Hi Bob,  
  
Here are the XPath’s that will update the four version values.  
  
/a:Project/a:ItemGroup[@Condition][1]/a:AssemblyAttributes[@Include=‘AssemblyFileVersion’]/a:Value  
/a:Project/a:ItemGroup[@Condition][1]/a:AssemblyAttributes[@Include=‘AssemblyVersion’]/a:Value  
  
/a:Project/a:ItemGroup[@Condition][2]/a:AssemblyAttributes[@Include=‘AssemblyFileVersion’]/a:Value  
/a:Project/a:ItemGroup[@Condition][2]/a:AssemblyAttributes[@Include=‘AssemblyVersion’]/a:Value  
  
Regards,  
Paul.

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [December 9, 2006, 3:37am UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-action-question/279/4 "2006-12-09T03:37:16Z")

</div>

Thanks for supplying a quick solution to my question and in the future I will attach any xml or other files with special formats. I should have known better and send many apologies.

---

<div class="post-metadata">

### Author: ![angus](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@angus](https://www.finalbuilder.com/forums/u/angus)
#### Post date: [December 11, 2006, 12:01pm UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-action-question/279/5 "2006-12-11T12:01:10Z")

</div>

Hi Bob,  
  
That’s OK. I think all of us here have found ourselves in “angle bracket hell” once or twice. With a bit of luck, the forum authors will update the editor page so it escapes them automatically.  
  
Regards,  
  
  
Angus
