[geotk] SLD in xml format

sorel johann johann.sorel at geomatys.fr
Wed Aug 24 03:37:51 EDT 2011

Hello trond

sorry for the late answer.

here is a small example :

private static final MutableSLDFactory SLDF = new DefaultSLDFactory();

     public static void main(String[] args) throws JAXBException {

         MutableStyledLayerDescriptor sld = SLDF.createSLD();

         StringWriter writer = new StringWriter();
         XMLUtilities util = new XMLUtilities();
         util.writeSLD(writer, sld, StyledLayerDescriptor.V_1_1_0);

         String str = writer.toString();



On 19/08/2011 09:53, Westgård Trond wrote:
> When I have made a style using the MutableStyleFactory etc, how could I in an easy way get the SLD xml into a String ?
> Regards
> Trond WEstgård
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit

More information about the Geotoolkit mailing list