I'm trying to make OBJ converter. The file structure of which I am trying to convert is an XML structure. Here's an example. I currently have a lua script that does this for me. But it always crashes on big objects. If you could help that would be amazing! It's for a game called "ROBLOX" The only information I need to convert is.

<int name="BrickColor">194</int> <-- Brick Color
<CoordinateFrame name="CFrame"> <-- Position


Vector3 name="size"> <-- Part size.

Here's the lua script.
http://pastebin.com/fcNA80Ss This currently grabs all of the ClassNames in the place and converts them to OBJ wavefront gemotry.