//Traverse the children and add them to a new arraylist
traverseChildren(gElem, groupChildren);
MTComponent[] childComps = (MTComponent[])groupChildren.toArray(new MTComponent[groupChildren.size()]);
//Add the children to the group
group.addChildren(childComps);
//Add the group to the arraylist of the parent
comps.add(group);
}else{//If NOT GROUP
if (node instanceof SVGGraphicsElement){
SVGGraphicsElement svgGfxElem = (SVGGraphicsElement)node;