break;
pFlames = pe + ATTR_JWF_FLAME.length() + 3;
flameXML = pXML.substring(ps, pFlames);
}
Flame flame = new Flame();
res.add(flame);
// Flame attributes
{
int ps = flameXML.indexOf("<" + ATTR_JWF_FLAME + " ");
int pe = -1;
boolean qt = false;
for (int i = ps + 1; i < flameXML.length(); i++) {
if (flameXML.charAt(i) == '\"') {
qt = !qt;
}
else if (!qt && flameXML.charAt(i) == '>') {
pe = i;
break;
}
}
String hs = flameXML.substring(ps + 7, pe);
parseFlameAttributes(flame, hs);
}
flame.getLayers().clear();
// Layers
int pLayers = 0;
while (true) {
int layerStart = flameXML.indexOf("<" + ATTR_LAYER + " ", pLayers);
if (layerStart < 0)
break;
int layerEnd = flameXML.indexOf("</" + ATTR_LAYER + ">", layerStart + 1);
if (layerEnd < 0)
break;
pLayers = layerEnd + ATTR_LAYER.length() + 3;
String layerXML = flameXML.substring(layerStart, pLayers);
Layer layer = new Layer();
flame.getLayers().add(layer);
XMLAttributes atts;
// Layer attributes
{
int ps = layerXML.indexOf("<" + ATTR_LAYER + " ");
int pe = layerXML.indexOf(">", ps);