ComponentBean bean = xmlTemplateConfigBean.getElement("/org/apache/shale/clay/config/address.xml");
assertNotNull(bean);
Iterator ci = bean.getChildrenIterator();
while (ci.hasNext()) {
ElementBean child = (ElementBean) ci.next();
AttributeBean attr = null;
if (child.getId().equals("htmlBegin")) {
attr = child.getAttribute("value");
assertEquals("<html>", attr.getValue());
} else if (child.getId().equals("htmlEnd")) {
attr = child.getAttribute("value");
assertEquals("</html>", attr.getValue());
} else if (child.getId().equals("header")) {
attr = child.getAttribute("value");
assertEquals("<head><title>Testing</title></head>", attr.getValue());
} else if (child.getId().equals("bodyBegin")) {
attr = child.getAttribute("value");
assertEquals("<body>", attr.getValue());
} else if (child.getId().equals("bodyEnd")) {
attr = child.getAttribute("value");
assertEquals("</body>", attr.getValue());
} else if (child.getId().equals("content")) {
//look for a component that we have setup to test
checkComponent(child, CUSTOM_HTML_COMPONENTS, true);
}
}
}