# Edit XML file, Multiple nodes at once?

**URL:** https://www.finalbuilder.com/forums/t/edit-xml-file-multiple-nodes-at-once/906
**Category:** Discussion
**Created:** [July 22, 2008, 4:58am UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-multiple-nodes-at-once/906 "2008-07-22T04:58:25Z")
**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: [July 22, 2008, 4:58am UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-multiple-nodes-at-once/906/1 "2008-07-22T04:58:25Z")

</div>

Hi

I have an XML file in the Attachment (test.xml),

and I want to change all the values of the elements to "test".  
I tried to achieve this with the "Edit XML File object" in Final Builder 5  
but it only changes the first elements value.

My XPATH string is: //stringField

A picture of the object its settings can be found as an attachment.

Thx in advance.

![scrnEditXmlFile.jpg](https://www.finalbuilder.com/forums/uploads/default/original/1X/3f2476929a427b8ee477a0b44140472817f068a8.jpeg)

[test.xml](https://www.finalbuilder.com/forums/uploads/default/original/2X/3/34d519f4a284406d499a48eb035410d87f341421.xml) (339 B)

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [July 23, 2008, 1:31am UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-multiple-nodes-at-once/906/2 "2008-07-23T01:31:32Z")

</div>

Hi   
  
 You should be able to do this by using the xml node iterator, something like this :   
  
 XML Document Define Action - loads the document   
  
 XML Node iterator - set the xpath to return the nodes you want to change.   
  
 - set the variable to the absolute xpath of the node   
  
 then use the Edit XML File action with the xpath variable   
  
 HTH

---

<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: [July 23, 2008, 9:45am UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-multiple-nodes-at-once/906/3 "2008-07-23T09:45:28Z")

</div>

Ok I set it up like you told me with the same settings, but it looks like it doesn't iterate well.   
It even doesn't change one element.

I've put a screenshot of the build log in the attachment so you can have a look at it.

Thx

![scrnEditXmlFile.jpg](https://www.finalbuilder.com/forums/uploads/default/original/1X/3f2476929a427b8ee477a0b44140472817f068a8.jpeg)

---

<div class="post-metadata">

### Author: ![tate](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/t/e19b73/32.png) [@tate](https://www.finalbuilder.com/forums/u/tate)
#### Post date: [July 24, 2008, 3:32am UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-multiple-nodes-at-once/906/4 "2008-07-24T03:32:00Z")

</div>

that’s a bit odd… can you send us your project file and we’ll see if we can sort it out. Email to support at [finalbuilder.com](http://finalbuilder.com)   
  
 thanks.

---

<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: [July 28, 2008, 2:13am UTC](https://www.finalbuilder.com/forums/t/edit-xml-file-multiple-nodes-at-once/906/5 "2008-07-28T02:13:17Z")

</div>

I sent it over to the support department, waiting for a solution...
