@Test public void put_to_leaf_map() { Reader xmlConfig = new StringReader("<?xml version=\"1.0\" encoding=\"utf-8\" ?>" + "<config name=\"test.foobar\">" + " <intmap>" + " <item key=\"bar\">1338</item>" + " <item key=\"foo\">1337</item>" + " </intmap>" + "</config>"); ConfigPayload userConfig = ConfigPayload.fromBuilder(new DomConfigPayloadBuilder(null).build(getDocument(xmlConfig))); assertPayload("{\"intmap\":{\"bar\":\"1338\",\"foo\":\"1337\"}}", userConfig); }
public ConfigPayloadBuilder build(Element configE) { parseConfigName(configE); ConfigPayloadBuilder payloadBuilder = new ConfigPayloadBuilder(configDefinition); for (Element child : XML.getChildren(configE)) { parseElement(child, payloadBuilder, null); } return payloadBuilder; }
DomConfigPayloadBuilder { public ConfigPayloadBuilder build(Element configE) { parseConfigName(configE); ConfigPayloadBuilder payloadBuilder = new ConfigPayloadBuilder(configDefinition); for (Element child : XML.getChildren(configE)) { parseElement(child, payloadBuilder, null); } return payloadBuilder; } }
DomConfigPayloadBuilder { public ConfigPayloadBuilder build(Element configE) { parseConfigName(configE); ConfigPayloadBuilder payloadBuilder = new ConfigPayloadBuilder(configDefinition); for (Element child : XML.getChildren(configE)) { parseElement(child, payloadBuilder, null); } return payloadBuilder; } DomConfigPayloadBuilder(ConfigDefinition configDefinition); }
DomConfigPayloadBuilder { public ConfigPayloadBuilder build(Element configE) { parseConfigName(configE); ConfigPayloadBuilder payloadBuilder = new ConfigPayloadBuilder(configDefinition); for (Element child : XML.getChildren(configE)) { parseElement(child, payloadBuilder, null); } return payloadBuilder; } DomConfigPayloadBuilder(ConfigDefinition configDefinition); ConfigPayloadBuilder build(Element configE); static ConfigDefinitionKey parseConfigName(Element configE); }
DomConfigPayloadBuilder { public ConfigPayloadBuilder build(Element configE) { parseConfigName(configE); ConfigPayloadBuilder payloadBuilder = new ConfigPayloadBuilder(configDefinition); for (Element child : XML.getChildren(configE)) { parseElement(child, payloadBuilder, null); } return payloadBuilder; } DomConfigPayloadBuilder(ConfigDefinition configDefinition); ConfigPayloadBuilder build(Element configE); static ConfigDefinitionKey parseConfigName(Element configE);  }