NodeList conditions = child.getElementsByTagNameNS("http://www.cruxframework.org/crux", "condition");
for (int j=0; j< conditions.getLength(); j++)
{
Element condition = (Element)conditions.item(j);
String userAgentValue = condition.getAttribute("when");
Device templateDevice = Device.valueOf(userAgentValue);
if (templateDevice.equals(supportedDevice))
{
NodeList replacements = condition.getElementsByTagNameNS("http://www.cruxframework.org/crux", "parameter");
for (int k=0; k< replacements.getLength(); k++)
{
Element replacement = (Element)replacements.item(k);