# Changing an XML node value?

**URL:** <https://forum.kirupa.com/t/changing-an-xml-node-value/256319>\
**Category:** flash\
**Created:** [April 1, 2008, 11:40pm UTC](https://forum.kirupa.com/t/changing-an-xml-node-value/256319 "2008-04-01T23:40:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablo\_2006](https://avatars.discourse-cdn.com/v4/letter/p/c67d28/32.png) [@pablo\_2006](https://forum.kirupa.com/u/pablo_2006)\
**Post date:** [April 1, 2008, 11:40pm UTC](https://forum.kirupa.com/t/changing-an-xml-node-value/256319/1 "2008-04-01T23:40:09Z")

</div>

Hi. I need to change an XML node value after its loaded for a photoviewer.  
(I’ve no control over the XML format, so I need to edit it at runtime)

This \<picture\> has no path

```auto

<root>
  <image>
    <picture>10.jpg</picture> 
  </image>
</root>

```

This comes from the “images” folder

```auto
 
<root>
  <image>
    <picture>images/10.jpg</picture> 
  </image>
</root>

```

Any idea how I can insert the string “images/” at runtime, so when I force the photoviewer to reload, It reads the modified XML, giving me control over where the images come from?

I’m retrieving the node value (10.jpg) via…

[AS]  
data\_xml.firstChild.childNodes\*.childNodes[j].firstChild.nodeValue;  
[/AS]

Thanks,  
Pablo
