ParserContext context) {
Map<String, Object> result = new HashMap<String, Object>();
NodeList ns = element.getElementsByTagNameNS(BLUEPRINT_NS, TAG_MAP);
// Use the parser context to parse the map for us
for (int i = 0; i < ns.getLength(); i++) {
MapMetadata metadata = context.parseElement(MapMetadata.class,
null, (Element) ns.item(i));
for (MapEntry entry : (List<MapEntry>) metadata.getEntries()) {
if (entry.getKey() instanceof ValueMetadata
&& entry.getValue() instanceof ValueMetadata) {
ValueMetadata key = (ValueMetadata) entry.getKey();
ValueMetadata value = (ValueMetadata) entry.getValue();