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?

[1] https://docs.wso2.com/display/CEP420/Map+Extension

Thanks and regards!
-- 
*Minudika Gammanpila*
Software Engineer - WSO2

Email   :  [email protected]
Mobile :  +94715659887
Web     :  http://wso2.com

<http://wso2.com> <http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to