NodeList sprites = infoDom.getElementsByTagName("sprite");
PU_Resources.this.mPokemonCount = sprites.getLength();
for(int i = 0; i < sprites.getLength(); i++)
{
Element element = (Element) sprites.item(i);
String name = element.getAttribute("n");
PU_Rect texCoords = new PU_Rect();
texCoords.x = Integer.parseInt(element.getAttribute("x"));
texCoords.y = Integer.parseInt(element.getAttribute("y"));
texCoords.width = Integer.parseInt(element.getAttribute("w"));
texCoords.height = Integer.parseInt(element.getAttribute("h"));
int offsetX = 0;
if(element.hasAttribute("oX"))
offsetX = Integer.parseInt(element.getAttribute("oX"));
int offsetY = 0;
if(element.hasAttribute("oY"))
offsetY = Integer.parseInt(element.getAttribute("oY"));
int width = texCoords.width;
if(element.hasAttribute("oW"))
width = Integer.parseInt(element.getAttribute("oW"));
int height = texCoords.height;
if(element.hasAttribute("oH"))
height = Integer.parseInt(element.getAttribute("oH"));
PU_Image spriteImage = new PU_Image(width, height, null);
spriteImage.setTextureCoords(texCoords, image.getWidth(), image.getHeight());
spriteImage.setOffsetX(offsetX);
spriteImage.setOffsetY(offsetY);