|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
flash.xml.XMLDocument typesHi,
in AS3 the flash.xml.XMLDocument class represents the legacy top- level XML class in AS2. The echo test example shows the flash.xml.XMLDocument as request but displays the new top-level XML class in AS3 for the response, and the test succeeds. Does this mean that the Flash Player in AS3 automagically turns flash.xml.XMLDocument classes from AMF messages into top-level XML AS3 class instances, or is it a bug in PyAMF and are we not returning the proper flash.xml.XMLDocument type but an AS3 XML type instead? Thijs |
|
|
|
Re: flash.xml.XMLDocument types
Both the legacy xml documents (type 0x07) and the top level xml class (type 0x0b) are converted to an ElementTree instance upon decoding. The amf3 context keeps track of the instances of the trees and if is in the 'legacy_xml' list, is encoded as such. Check http://pyamf.org/browser/pyamf/trunk/pyamf/tests/test_amf3.py#L414 for the relevant tests.
As these tests pass in current trunk (r415) I'm inclined to think there is a problem with the client side, or is automagically converting as you suggested. More investigation may be required. On Tue, 2007-11-27 at 21:16 +0100, Thijs Triemstra | Collab wrote: Hi, in AS3 the flash.xml.XMLDocument class represents the legacy top- level XML class in AS2. The echo test example shows the flash.xml.XMLDocument as request but displays the new top-level XML class in AS3 for the response, and the test succeeds. Does this mean that the Flash Player in AS3 automagically turns flash.xml.XMLDocument classes from AMF messages into top-level XML AS3 class instances, or is it a bug in PyAMF and are we not returning the proper flash.xml.XMLDocument type but an AS3 XML type instead? Thijs _______________________________________________ PyAMF dev mailing list - dev@... http://lists.pyamf.org/mailman/listinfo/dev
|
|
|
|
Re: flash.xml.XMLDocument types
I read the xml chapter in the essential as3 book but it mainly talks about the as3 xml class. The as3 language reference doesn't mention anything about automatic conversions but I bet it does. Red5 doesn't support the legacy xml type and I think sabreamf doesn't support it either so I'm considering it fixed.
Thijs On Nov 27, 2007, at 9:30 PM, Nick Joyce wrote: Both the legacy xml documents (type 0x07) and the top level xml class (type 0x0b) are converted to an ElementTree instance upon decoding. The amf3 context keeps track of the instances of the trees and if is in the 'legacy_xml' list, is encoded as such. Check http://pyamf.org/browser/pyamf/trunk/pyamf/tests/test_amf3.py#L414 for the relevant tests. |
| Free embeddable forum powered by Nabble | Forum Help |