ns:Namespace = xml.namespace(); default xml namespace = ns; Although since you're talking about the default namespace, this shouldn't be necessary...
-- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -----Original Message----- From: Todd <[EMAIL PROTECTED]> Reply-To: [email protected] To: [email protected] Subject: [flexcoders] Re: E4X Namespace Issues... Date: Thu, 17 Jan 2008 16:02:49 -0000 Hello, I got it to work. I had to change the e4x expression a little to get it to work. I needed to qualify the ID with the namespace. So this code works: var xml:XML = new XML(inputXML.text); var ns:Namespace = xml.namespace(); trace(xml.namespace()); var filterdXML:XMLList = new XMLList(xml..ns::folder.(ns::id == 13)); outputXML.text = filterdXML.toXMLString(); Notice the ns:id == 13. So, now that I got it working, I'd still like to get it working with the following syntax so I dont have to add namespace aliases to my e4x: private namespace ns="http://...." use namespace ns Thanks for any suggestions on taking this further. --- In [email protected], "Todd" <[EMAIL PROTECTED]> wrote: > > OK, I tried the following code and it's not working: > > var xml:XML = new XML(inputXML.text); > var ns:Namespace = xml.namespace(); > var filterdXML:XMLList = new XMLList(xml..ns::folder.(id == 13)); > outputXML.text = filterdXML.toXMLString(); > > But, if I add a prefix to the namespace declared in the XML, it all > works. > xmlns:com="http://www.directTestmarketing.com/ws/schemas/communicationHi \ > erarchyService"> > > ( added the :com). > > I'm still not considering my situation fixed, though. I'd like to be > able to get at the default namespace. > > Thanks, > Todd > --- In [email protected], "fourctv" fourctv@ wrote: > > > > try this: > > > > var xml:XML = new XML(inputXML.text); // get the xml > > var ns:Namespace = xml.namespace(); // extract > the default namespace > > trace('folder13:',xml..ns::folder.(id ==13)); // use it in the E4X > expression > > > > hth > > julio > > >

