This is essentially a SLD parser. SLD is quite large, only some elements are supported.
NOTE: GeoTools provide similar capabilities, but the library has heaps of dependencies and their maven repository is unreliable. As silly as it sound, it was more strait-forward to re-implement it.