# Read/write XML? = me going crazy!

**URL:** https://forum.kirupa.com/t/read-write-xml-me-going-crazy/52732
**Category:** Uncategorized
**Created:** [May 26, 2004, 8:40pm UTC](https://forum.kirupa.com/t/read-write-xml-me-going-crazy/52732 "2004-05-26T20:40:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![CommanderCool](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/commandercool/32/158_2.png) [@CommanderCool](https://forum.kirupa.com/u/CommanderCool)
#### Post date: [May 26, 2004, 8:40pm UTC](https://forum.kirupa.com/t/read-write-xml-me-going-crazy/52732/1 "2004-05-26T20:40:25Z")

</div>

hey guys, i’m looking for a little guidance and expertise… i’ve got a portfolio built out of XML, which works great when pulling it from the xml file, but I want to build a simple admin page so that the XML can be added to, edited and then saved to the original file. I’ve looked around the web including kirupa, and tried to follow some advice, but i’m always getting php errors.

heres the actionscript i’m using: (the xml is sent to a php file displayed in a frame, btw)

menu\_xml = new XML();  
menu\_xml.ignoreWhite = true;  
menu\_xml.load(“portfolio.xml”);  
menu\_xml.onLoad = function(ok) {  
if(ok) {  
xml\_node = menu\_xml;  
menuOpen = 0;  
buildMainMenu(menu\_xml);

```
}

```

}

upload.onRelease = function() {

```
menu_xml.contentType = 'text/xml';

```

menu\_xml.send(“update.php”,“mainFrame”)  
}

and update.php uses the php source from this thread:  
[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=49418&highlight=xml](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=49418&highlight=xml)

the problem is, it doesn’t seem php even recieves the post variable… i tried even just echoing HTTP\_RAW\_POST\_DATA, but its just blank… i’m also testing this on a server with PHP 4.x, is there something i’m missing?.. one of the most common errors i’m getting is ‘unexpected T\_CONSTANT\_ENCAPSED\_STRING’… do i have to parse the XML somehow to get it to carry over? thanks.
