# Xml sendAndLoad does not want to post data?

**URL:** <https://forum.kirupa.com/t/xml-sendandload-does-not-want-to-post-data/46819>\
**Category:** Uncategorized\
**Created:** [March 28, 2004, 2:17pm UTC](https://forum.kirupa.com/t/xml-sendandload-does-not-want-to-post-data/46819 "2004-03-28T14:17:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![naderslim](https://avatars.discourse-cdn.com/v4/letter/n/3be4f8/32.png) [@naderslim](https://forum.kirupa.com/u/naderslim)\
**Post date:** [March 28, 2004, 2:17pm UTC](https://forum.kirupa.com/t/xml-sendandload-does-not-want-to-post-data/46819/1 "2004-03-28T14:17:26Z")

</div>

Hi guys,  
I am reposting because my topic/problem has become more refined.

I am passing an xml object to an asp page in this case using xml.sendAndLoad. as a test I want to capture the post data and write it to a text file. I have full permissions to do so and the file gets created…but with 0 bytes. No data.

Here is my flash code:

\_root.searchXML = new XML();  
searchlist = \_root.searchXML.createElement(“searchlist”);  
for(i=1;i\<20;i++){

```
searchparam = _root.searchXML.createElement("searchparam");
param = _root.searchXML.createElement("param");
param.appendChild(_root.searchXML.createTextNode("param"+i));
paramvalue = _root.searchXML.createElement("paramvalue");
paramvalue.appendChild(_root.searchXML.createTextNode(_root["paramvalue"+i]));
searchparam.appendChild(param);
searchparam.appendChild(paramvalue);
searchlist.appendChild(searchparam);

```

}  
\_root.searchXML.appendChild(searchlist);

\_root.searchXML.contentType = “text/xml”;

\_root.menuXml\_cars2 = new XML();  
\_root.menuXml\_cars2.ignoreWhite = true;  
\_root.menuXml\_cars2.onLoad = function(success) {  
if(success){  
//trace(“success!”);  
}

}

trace(\_root.searchXML);

\_root.searchXML.sendAndLoad(“catalog/search.asp”, \_root.menuXml\_cars2);

\*\*And here is my asp code:

\<%  
Dim strXML, fso, f  
Const ForReading = 1, ForWriting = 2, ForAppending = 8

Set fso = CreateObject(“Scripting.FileSystemObject”)  
Set f = fso.OpenTextFile(“C: estfile.txt”, ForWriting, True)  
strXML = Request.Form  
f.Write strXML  
%\>

\*\*  
this should work…when I do the trace call from within flash the xml object is definitely holding a tree…but for some reason it is not being passed or I cannot access it properly

Please…if anybody can point out a problem I do not see or knows of issues related to xml.sendAndLoad…

thx
