I thought, he won't be able to wait till we update the doc :P On Thu, Jul 19, 2012 at 11:31 PM, Madhuka Udantha <madh...@wso2.com> wrote:
> Hi, > > Better we added those in to jaggery API Documentation (XML Basic) Rather > than just put link for E4X. > +1 go ahead > > Thnaks > > > On Thu, Jul 19, 2012 at 10:02 PM, Ruchira Wageesha <ruch...@wso2.com>wrote: > >> If you want to do a namespace aware query, then use [1], else use [2]. >> You should use proper E4X queries[3]. >> >> /Ruchira >> >> [1] >> var ns = "http://www.wso2.org/governance/metadata"; >> print(x.*::application.*::key.text()); >> >> [2] >> print(x.ns::application.ns::key.text()); >> >> [3] http://wso2.org/project/mashup/2.3.2/docs/e4xquickstart.html >> >> On Thu, Jul 19, 2012 at 6:30 PM, Dilshan Edirisuriya <dils...@wso2.com>wrote: >> >>> Hi, >>> >>> Tried to parse the following xml chunk. >>> >>> <% >>> >>> var x= <metadata xmlns="http://www.wso2.org/governance/metadata"> >>> <application> >>> <key>test1</key> >>> <description>test1</description> >>> <name>test1</name> >>> </application> >>> <serviceLifecycle> >>> <lifecycleName>ApplicationLifecycle</lifecycleName> >>> </serviceLifecycle> >>> </metadata>; >>> >>> print(x.application.key); >>> >>> %> >>> >>> The objective of this is to print the key. But when testing this on try >>> it, it prints an empty string. The issue is with the "xmlns" attribute >>> NAME. It will work for any other attribute other than xmlns. Is there any >>> other way to read the key? >>> >>> >>> Regards, >>> >>> Dilshan >>> >>> >>> >>> _______________________________________________ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> *Ruchira Wageesha >> Senior Software Engineer & Member, Management Committee, Development >> Technologies* >> *WSO2 Inc. - lean . enterprise . middleware | wso2.com* >> * >> email: ruch...@wso2.com, blog: ruchirawageesha.blogspot.com, mobile: +94 >> 77 5493444* >> >> >> _______________________________________________ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > *Madhuka* Udantha > http://madhukaudantha.blogspot.com/ > > -- *Ruchira Wageesha Senior Software Engineer & Member, Management Committee, Development Technologies* *WSO2 Inc. - lean . enterprise . middleware | wso2.com* * email: ruch...@wso2.com, blog: ruchirawageesha.blogspot.com, mobile: +94 77 5493444*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev