i want to update my sld. In my sld, there is not a filter but i want to apply a filter using the python,dynamically not by manually putting the values in sld. This is my sld.
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" `xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd">`
<NamedLayer>
<Name>Simple polygon with stroke</Name>
<UserStyle>
<Title>SLD Cook Book: Simple polygon with stroke</Title>
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#000080</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#FFFFFF</CssParameter>
<CssParameter name="stroke-width">2</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Now i want to add a filter on my table attribute name_1 is there any way to do this in python. New filter will be in a Rule tag and will be under the FeatureTypeStyle.