Permalink
Browse files

Added .as_sld method to StyledLayerDescriptor.

  • Loading branch information...
1 parent 7258935 commit 834c82b0658c632f387a9587246d7325f614cd77 David Zwarg committed Dec 5, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 sld/__init__.py
View
9 sld/__init__.py
@@ -1465,3 +1465,12 @@ def create_namedlayer(self, name):
namedlayer = self.get_or_create_element('sld', 'NamedLayer')
namedlayer.Name = name
return namedlayer
+
+ def as_sld(self):
+ """
+ Serialize this SLD model into a string.
+
+ @rtype: string
+ @returns: The content of the SLD.
+ """
+ return tostring(self._node)

0 comments on commit 834c82b

Please sign in to comment.