int pe = movieXML.indexOf("</" + TAG_JWF_MOVIE_PART + ">", ps + 1);
if (pe < 0) {
pe = movieXML.indexOf("/>", ps + 1);
}
String hs = movieXML.substring(ps + TAG_JWF_MOVIE_PART.length() + 1, pe);
FlameMoviePart part = new FlameMoviePart();
movie.addPart(part);
int psFlame = hs.indexOf("<flame ");
if (psFlame > 0) {
int peFlame = hs.indexOf("</flame>", psFlame + 1);
String flameXML = hs.substring(psFlame, peFlame + 8);
Flame flame = new FlameReader(prefs).readFlamesfromXML(flameXML).get(0);
part.setFlame(flame);
//System.out.println(flameXML);
hs = hs.substring(0, psFlame);
}
else {
psFlame = hs.indexOf("<jwf-flame ");
if (psFlame > 0) {
int peFlame = hs.indexOf("</jwf-flame>", psFlame + 1);
String flameXML = hs.substring(psFlame, peFlame + 12);
Flame flame = new FlameReader(prefs).readFlamesfromXML(flameXML).get(0);
part.setFlame(flame);
//System.out.println(flameXML);
hs = hs.substring(0, psFlame);
}
}