JGoLayer mystery

Hello All,

I was trying to write a layer object as XML using SVGWriteLayer() method of JGoDocument. But it was writing all the layers inside the document. But I'm interested only in the top most layer to be written. Any help?? Thanks in advance.....

SVGWriteLayer() will in fact write the contents of just a single layer. However, setting up all the arguments properly and calling SVGWriteLayer() independently would be difficult.
It might be easier to override SVGWriteLayer() in a subclass of JGoDocument and only call the super method if the layer argument is the layer you are interested in. That way you can simply use the DefaultDocument SVGWriteDoc() method to do all the normal setup for you and just write a single layer.