Here's a couple:

// namespace constant

public namespace default_ns = "http://fmr.com/BackOffice/PseSearch";;

// init test

public function init () : void {
        var xml : XML = 
                <PseSearchResponse 
xmlns="http://fmr.com/BackOffice/PseSearch";>
                        <SearchPlan>
                        
        <MaxExceededFlag>false</MaxExceededFlag>
                                <Plans>
                                        <Client>
                                        
        <EnterpriseId>99999</EnterpriseId>
                                                <ClientName>Cool 
Client</ClientName>
                                        
        <RelationshipMgrNm>GARY BUSEY</RelationshipMgrNm>
                                        
        <BusinessSeg>CORE</BusinessSeg>
                                                <Plans>
                                                        <Plan>
                                                        
        <PlanNumber>55555</PlanNumber>
                                                        
        <PlanName>SAVINGS PLAN</PlanName>
                                                        </Plan>
                                                </Plans>
                                        </Client>
                                </Plans>
                        </SearchPlan>
                </PseSearchResponse>;   
        
        // use namespace prefix
        
        var ns : Namespace = xml.namespace ();
        
        trace (xml.ns::SearchPlan.ns::Plans);
                                        
        // use namespace constant

        use namespace default_ns;

        trace (xml.SearchPlan.Plans);
}

--- In flexcoders@yahoogroups.com, "ben.clinkinbeard" 
<[EMAIL PROTECTED]> wrote:
>
> The struggle against XML with a default namespace continues...  
> Currently, the only way I am able to get to the first Plans node 
is by
> using QName objects to traverse one level at a time, like this:
> 
> var ns:Namespace = new Namespace("myDefaultNamespaceString");
> var q:QName = new QName(ns.uri, "SearchPlan");
> var q2:QName = new QName(ns.uri, "Plans");
> searchResults = XML(list).child(q).child(q2);
> 
> This is not ideal and would obviously not be practical for deeply
> buried nodes. There's got to be a better way but I can't seem to 
find
> it. Can anyone help?
> 
> Thanks,
> Ben
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to