question: protected PShape parseChild ( XML elem ) { String name = elem . getName ( ) ; PShapeSVG shape = null ; if ( name == null ) { } else if ( name . equals ( "g" ) ) { shape = new PShapeSVG ( this , elem , true ) ; } else if ( name . equals ( "defs" ) ) { shape = new PShapeSVG ( this , elem , true ) ; } else if ( name . equals ( "line" ) ) { shape = new PShapeSVG ( this , elem , true ) ; shape . parseLine ( ) ; } else if ( name . equals ( "circle" ) ) { shape = new PShapeSVG ( this , elem , true ) ; shape . parseEllipse ( true ) ; } else if ( name . equals ( "ellipse" ) ) { shape = new PShapeSVG ( this , elem , true ) ; shape . parseEllipse ( false ) ; } else if ( name . equals ( "rect" ) ) { shape = new PShapeSVG ( this , elem , true ) ; shape . parseRect ( ) ; } else if ( name . equals ( "polygon" ) ) { shape = new PShapeSVG ( this , elem , true ) ; shape . parsePoly ( true ) ; } else if ( name . equals ( "polyline" ) ) { shape = new PShapeSVG ( this , elem , true ) ; shape . parsePoly ( false ) ; } else if ( name . equals ( "path" ) ) { shape = new PShapeSVG ( this , elem , true ) ; shape . parsePath ( ) ; } else if ( name . equals ( "radialGradient" ) ) { return new RadialGradient ( this , elem ) ; } else if ( name . equals ( "linearGradient" ) ) { return new LinearGradient ( this , elem ) ; } else if ( name . equals ( "font" ) ) { return new Font ( this , elem ) ; } else if ( name . equals ( "metadata" ) ) { return null ; } else if ( name . equals ( "text" ) ) { PGraphics . showWarning ( "Text and fonts in SVG files " + "are not currently supported, " + "convert text to outlines instead." ) ; } else if ( name . equals ( "filter" ) ) { PGraphics . showWarning ( "Filters are not supported." ) ; } else if ( name . equals ( "mask" ) ) { PGraphics . showWarning ( "Masks are not supported." ) ; } else if ( name . equals ( "pattern" ) ) { PGraphics . showWarning ( "Patterns are not supported." ) ; } else if ( name . equals ( "stop" ) ) { } else if ( name . equals ( "sodipodi:namedview" ) ) { } else { PGraphics . showWarning ( "Ignoring <" + name + "> tag." ) ; } return shape ; }
target:  Parse a child XML element. Override this method to add parsing for more SVG elements.