On Tue, Feb 27, 2018 at 1:43 AM, Mohanadarshan Vivekanandalingam < [email protected]> wrote:
> > > On Sat, Feb 24, 2018 at 8:08 PM, Minudika Malshan <[email protected]> > wrote: > >> Hi all, >> >> In Siddhi Map Extension, map:createFromXML will return a hashmap created >> from the given XML payload. >> >> However, when this payload has a namespace, that namespace is propagated >> to the child elements also. Therefore in such cases, in the generated hash >> map will have the keys in the following format instead of having only the >> element name. >> >> *{namespace}elementName* >> >> Therefore, when trying to retrieve values from that map, Instead of using >> only the element name as the key, we have to provide the key in above >> format. >> >> Eg : >> We have to use, >> >> *map:get(map, '{namespace}key)* >> instead of >> *map:get(map, 'key')* >> >> In the documentation, this has not been mentioned. [1] >> >> Shall we add these info to the doc? >> Or Is it safe to change the implementation to drop the namespace and to >> generate the map with element names as the keys? >> > > When processing a XML element, we have to consider the namespace. If not, > we will end up many issues. I am OK for using namespace with key. Let's > document that. > BTW, do we need to provide namespace inside curly brace ? > > Thanks, > Mohan > > > >> >> [1] https://docs.wso2.com/display/CEP420/Map+Extension >> >> Thanks and regards! >> -- >> *Minudika Gammanpila* >> Software Engineer - WSO2 >> >> Email : [email protected] >> Mobile : +94715659887 <+94%2071%20565%209887> >> Web : http://wso2.com >> >> <http://wso2.com> <http://wso2.com/signature> >> > > > > -- > *V. Mohanadarshan* > *Technical Lead,* > *Data Technologies Team,* > *WSO2, Inc. http://wso2.com <http://wso2.com> * > *lean.enterprise.middleware.* > > email: [email protected] > phone:(+94) 771117673 <+94%2077%20111%207673> > -- *V. Mohanadarshan* *Technical Lead,* *Data Technologies Team,* *WSO2, Inc. http://wso2.com <http://wso2.com> * *lean.enterprise.middleware.* email: [email protected] phone:(+94) 771117673
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
