Try searching for "actionscript xml namespaces tutorial" From: Oleg Konovalov <oleg...@gmail.com<mailto:oleg...@gmail.com>> Date: Tuesday, January 21, 2014 6:45 AM To: aharui <aha...@adobe.com<mailto:aha...@adobe.com>>, "dev@flex.apache.org<mailto:dev@flex.apache.org>" <dev@flex.apache.org<mailto:dev@flex.apache.org>> Subject: Re: Extracting XML from web service result with namespace
Alex, Could you please elaborate? I haven't used either of those classes and not sure which document you are referring to, which version of Flex, etc. and how to use these classes to extract useful XML from XML with namespaces. Any code samples? TIA, Oleg. On Mon, Jan 20, 2014 at 12:33 PM, Alex Harui <aha...@adobe.com<mailto:aha...@adobe.com>> wrote: See the doc on Qname and Namespace. On 1/20/14 8:54 AM, "Oleg Konovalov" <oleg...@gmail.com<mailto:oleg...@gmail.com>> wrote: >Hi, > > > > >I need to extract some XML data from proprietary Web Service (to be fed to >HierarchicalData for dataProvider of ADG). > > > >So I made service.returnType=¹e4x¹; > >In that case it returns data as XML. > > > >I need to get useful data from it after Snapshot: > ><SOAP-ENV:Envelope >xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/ >"> > ><SOAP-ENV:Header >xmlns:msdwHdr="http://xml.msdw.com/ns/appmw/soap/1.0/header >"> > ><msdw:RequestID xmlns:msdw="http://xml.msdw.com/ns/appmw/soap/1.0/header >">restsoap#1390182244050#197728273958044232</msdw:RequestID> > ><msdwHdr:FinalMessage>true</msdwHdr:FinalMessage> > ></SOAP-ENV:Header> > ><SOAP-ENV:Body> > ><ADSSnapshotResponse xmlns="http://xml.ms.com/ns/appmw/dataserver/1.0"> > ><Snapshot seqNo="0"> > >*<BASE_ELEMENT_NAME BASE_ELEMENT_NAME="4.11.2.0">* > >ŠŠ.. > > > >Using E4X, like: > >*var* root:XML = event.result *as* XML; //good! > > >*var* xmlRoot1:XMLList = root[*'SOAP-ENV:Body'* >].ADSSnapshotResponse.Snapshot.BASE_ELEMENT_NAME; > >it does return XMLList (tried different variants), but debugger shows >nothing at all inside that XMLList. > > >*var* root1:XMLList = root.children(); // that returns valid XMLList with >2 XML elements inside > > > >But all other data I could not get if I use any E4X: > > > >Can I skip Envelope, going to Body as one of its children? suppose I >can... > > > >a) root.*SOAP-ENV:Body would give compilation errors because of Œ-Œ, Œ:¹* > > > >*b) root.Body gives blank XMLList* > > > >c) root.Body[0] returns NULL > > > > > >Any idea how to extract the load from ADS Response (envelope)? > > > >What can I do regarding XML Namespaces in E4X ? > > > > > >If I set service.returnType="xml" it returns data as XMLNode's. > >But I prefer to use E4X if possible. > > > >Please help! > > > >TIA, > >Oleg. > > > >P.S.: using Flex 4.5.1 with Flex3 ADG. -- Thank you, Oleg.