Howto-Marshal:
protected function marshalMetaMedia(order:Order) : XML {var xml:XML =<ns:order xmlns:ns="http://www.ordersystem.se/schema/order/1.0"><id>{order.id}</id></ns:metamedia>;return xml;}
See how simple it is to create XML and to intertwine it with the values passed to the method! It's to easy to believe, huh? :-)
HowTo-Unmarshal:
protected function unmarshalOrder(xml:XML):MetaMedia {var order:Order = new Order();order.id = xml["id"].text();return order;}
Simple is beautiful!
0 comments:
Post a Comment