Para acessar nós de xmls "customizados" (<ns2:dest>) diretamente, vc
precisará declarar um NameSpace... dá uma lida nos docs q explica bem isso,
é bem fácil.


Abraço.


2009/7/6 Pergentino Araújo <[email protected]>

> Opa Vinícius,
>
> não tenho tempo agora para "acompanhá-lo", mas te passo o caminho das
> pedras ;)
>
> Aqui tem o link oficial:
> http://livedocs.adobe.com/flex/3/langref/XMLList.html
>
> E aqui, o restante ;)
>
> http://www.google.com.br/search?hl=pt-BR&client=firefox-a&rls=org.mozilla%3Apt-BR%3Aofficial&hs=oIU&q=trabalhando+com+xml+flex+3&btnG=Pesquisar&meta=
>
>
> []'s
>
> 2009/7/6 Vinicius <[email protected]>
>
>
>> Pergentino,,
>>
>> Consegui carregar em um XML:
>>
>> var result:AcknowledgeMessage = event.message as
>> AcknowledgeMessage;
>>
>> Alert.show(result.toString(), "result.toString()");
>> Alert.show(result.body.toString(), "result.body.toString()");
>>
>> var data:String = result.body.toString() as String;
>> Alert.show(data, "data");
>>
>> var message1:XML = data as XML;
>> Alert.show("aqui2!");
>>
>> Esses são os dados do arquivo:
>> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/
>> envelope/"><soapenv:Body><ns2:pptToImageResponse xmlns:ns2="http://
>> www.example.org/PPService
>> "><ns2:dest>flex_20090706102701171</ns2:dest><ns2:size>8</ns2:size></ns2:pptToImageResponse></soapenv:Body></soapenv:Envelope>
>>
>> Você sabe como eu pego esses dois:
>> <ns2:dest>flex_20090706102701171</ns2:dest>
>> <ns2:size>8</ns2:size>
>> ????
>>
>> Obrigado.
>>
>> On 6 jul, 10:00, Vinicius <[email protected]> wrote:
>> > Achei que conseguiria fazer isso pegando do próprio objeto
>> > AcknowledgeMessage.
>> >
>> > Acho que poderia usar como xml sim, vou dar uma procurada como fazer
>> > isso, se puder dare uma dica eu agradeço.
>> >
>> > Obrigado.
>> >
>> > On 6 jul, 09:56, Pergentino Araújo <[email protected]> wrote:
>> >
>> > > A solução não seria tratá-lo como um XML e pegar as informações ?!
>> >
>> > > []'s
>> >
>> > > 2009/7/6 Vinicius <[email protected]>
>> >
>> > > > Pessoal,
>> >
>> > > > Tenho um resulthandler que está chegando esta informação:
>> >
>> > > > (mx.messaging.messages::AcknowledgeMessage)#0
>> > > >  body = "<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
>> > > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/
>> > > > envelope/ <http://schemas.xmlsoap.org/soap/%0Aenvelope/
>> >"><soapenv:Body><ns2:pptToImageResponse
>> > > > xmlns:ns2="http://
>> > > >www.example.org/PPService
>> > > >
>> "><ns2:dest>flex_20090706095144390</ns2:dest><ns2:size>8</ns2:size></ns2:pptToImageResponse></soapenv:Body></soapenv:Envelope>"
>> > > >  clientId = "DirectHTTPChannel0"
>> > > >  correlationId = "06FE6273-6317-88AE-7950-501C8D2E9F6B"
>> > > >  destination = ""
>> > > >  headers = (Object)#1
>> > > >    DSStatusCode = 200
>> > > >  messageId = "710E0DC9-A843-385F-237F-501CD2D0F50A"
>> > > >  timestamp = 0
>> > > >  timeToLive = 0
>> >
>> > > > Este é o método:
>> >
>> > > > private function resultHandler1(event:ResultEvent):void{
>> > > >                        var result:AcknowledgeMessage = event.message
>> as
>> > > > AcknowledgeMessage;
>> > > >                        Alert.show(result.toString(),
>> "result.toString()");
>> > > >                        Alert.show(result.body.toString(),
>> > > > "result.body.toString()");
>> > > >                        var result1:Array = result.body as Array;
>> > > >                        Alert.show("aqui!");
>> > > > }
>> >
>> > > > Consegui pegar o body, mas o que eu preciso mesmo é guardar essas
>> > > > variáveis:
>> >
>> > > > <ns2:dest>flex_20090706095144390</ns2:dest>
>> > > > <ns2:size>8</ns2:size>
>> >
>> > > > Alguém sabe como eu faço isso?
>> >
>> > > > Obrigado.
>> >
>> > > --
>> > > Atenciosamente, Pergentino.
>>
>>
>
>
> --
> Atenciosamente, Pergentino.
>
> >
>


-- 
Mário Júnior
Programador Java / Adobe Flex
http://blog.mariojunior.com

--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito na lista "flexdev"
Para enviar uma mensagem, envie um e-mail para [email protected]
Para sair da lista, envie um email em branco para 
[email protected]
Mais opções estão disponíveis em http://groups.google.com/group/flexdev
-~----------~----~----~----~------~----~------~--~---

Responder a