![]() |
|
||||||||||
|
|||||
|
Регистрация: Mar 2010
Сообщений: 20
|
Как вывести полученный от сервера XML на экран целиком без изменений.
то есть, допустим получаю я <restResponse object="user" method="getInfoAction"> <id>12313546</id> <fullName>Василий Пупкин</fullName> <nick>Vasyok</nick> <isOnline>yes</isOnline> <type>student</type> <smallAvatar>http://scribbler.ru/uploaded/avatar/user/12313546/small.jpg</smallAvatar> <mediumAvatar>http://scribbler.ru/uploaded/avatar/user/12313546/medium.jpg</mediumAvatar> <userPic>http://scribbler.ru/uploaded/avatar/user/12313546/big.jpg</userPic> </restResponse> <restResponse object="user" method="getInfoAction"> <id>12313546</id> <fullName>Василий Пупкин</fullName> <nick>Vasyok</nick> <isOnline>yes</isOnline> <type>student</type> <smallAvatar>http://scribbler.ru/uploaded/avatar/user/12313546/small.jpg</smallAvatar> <mediumAvatar>http://scribbler.ru/uploaded/avatar/user/12313546/medium.jpg</mediumAvatar> <userPic>http://scribbler.ru/uploaded/avatar/user/12313546/big.jpg</userPic> </restResponse> |
|
|||||
|
Регистрация: Mar 2010
Сообщений: 20
|
|
|
|||||
|
нет, см. выше
Более подробно:
__________________
Ну все, теперь Забава м-о-я. Гы-гы, а корабль мой! Последний раз редактировалось TanaTiX; 25.03.2010 в 22:45. |
|
|||||
|
Регистрация: Mar 2010
Сообщений: 20
|
Вот полностью код:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="onstart()" layout="absolute" width="685" height="600" cornerRadius="5" backgroundColor="white" alpha="1.0"> <mx:HTTPService id="service" result="serviceresult(event)" fault="servicefault(event)" method="GET" contentType="application/xml" useProxy="false"> </mx:HTTPService> <mx:Script> <![CDATA[ import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; private var appKey:String; private function onstart():void{ appKey="appKey=sdfsdfsdsfsd" } private function onclick():void{ service.url="http://dfgdfgdfgdf.ru/api/rest/user.getInfo?"+appKey service.send() } private function servicefault(event:Event):void { trace('broken service') } private function serviceresult(e:Event):void { text1.text=e.target.data } ]]> </mx:Script> <mx:Button x="214" y="321" label="Button" click="onclick()"/> <mx:Text x="342" y="77" text="Text" width="300" height="141" id="text1"/> </mx:Application> |
|
|||||
|
...
модератор форума
Регистрация: Sep 2006
Адрес: Minsk
Сообщений: 4,286
|
TopIce, попробуйте resultFormat text или xml поставить.
|
|
|||||
|
Регистрация: Mar 2010
Сообщений: 20
|
Да, спасибо. уже поставил resultFormat=text
Все работает. Счастью нет придела) |
![]() |
![]() |
Часовой пояс GMT +4, время: 23:48. |
|
|
« Предыдущая тема | Следующая тема » |
|
|