This content has been marked as final. Show 4 replies
(event.result as XML).EText
I tried using (event.result as XML).EText, but I got an error.
In the meantime I found an workaround:
For the operation I used the the following resultFormat: resultFormat="e4x"
Then I'm able to access the parameter in the following way:
It is because you have namespaces in the XML. E4X won't work if the namespaces aren't declared and used. Do this where you put variable definitions:
private namespace soap= " http://schemas.xmlsoap.org/soap/envelope/";
use namespace soap;
private namespace n0="urn:spp-com:document:spp:soap:functions:mc-style";
use namespace n0;
Then (event.result as XML).EText will work. I'm sorry that I didn't see the namespaces the first time.
You're probably thinking that this is overkill for what you want to do and your work-around is fine for simple cases. But when you have complex XML and a lot of it, using the E4X syntax will be mighty handy.
Thanks, I'm quite new to all this stuff, but I think now I understood the concept of the namespaces.