Never had this exact problem, but I might just add that the AS400 uses EBCDIC rather than ASCII which might be a place to start looking. Sorry for lack of more specifics and I wish you well in your search.
I think it's not important that data comes from AS400. I make a new application in which I read an XML file, this one:
with HTTPService Spark tag and the result is the same, I can see blank spaces after apple but not blank spaces before pear. Looking at Network Monitor the Raw View give me this:
HTTP/1.1 200 OK
Date: Wed, 02 Feb 2011 16:15:33 GMT
Server: Apache/2.0.64 (Win32)
Last-Modified: Wed, 02 Feb 2011 15:50:53 GMT
<root><code> pere</code><code>mele </code></root>
as you can see there are blank spaces, when the result handler HTTPService function is run the result is that blank spaces before "pear" disappear not after "apple".
The function is:
var arrow:ArrayCollection = new ArrayCollection();
protected function prova_resultHandler(event:ResultEvent):void
this.arrow = event.result.root.code;
firstcode = this.arrow;
secondcode = this.arrow;
Yes, that was a bit of a long shot. I wonder if the whitespace is the problem. This is probably less of a long-shot, but
when "ingoreWhitespace" is true, it removes beginning and ending white space from text nodes.
Yes, the whitespaces is the problem. We want to preserve whitespaces before and after any value.
I change my example application; here is the code:
<?xml version="1.0" encoding="utf-8"?>
private var myURLservice:URLLoader = new URLLoader();
private var myURL:URLRequest = new URLRequest("http://localhost/flex/example/provadati.xml");
[Bindable]private var XMLdati:XMLList;
protected function resultExample_resultHandler(event:ResultEvent):void
XML.ignoreWhitespace = false;
XMLdati = new XMLList(event.result.root.code);
firstcode.text = this.XMLdati.toString();
private function application1_creationCompleteHandler(event:FlexEvent):void
<s:TextInput x="145" y="274" id="firstcode"/>
XML file "provadati.xml":
When I run the application I can see on TextInput the value "pear,apple ", whitespaces at the end are preserved but at the begin not.
If I set "XML.ignoreWhitespace=true" the result is that blankspaces at the end are trimmed, as expected.
I hope I explain correctly my problem and I thanks for the replies, have you any ideas on what can I do?