I'm trying to generate an xml document (an SLD file, to be precise) using XMLBeans.
Ideally, I want an output like:
<PolygonSymbolizer>
... stuff
</PolygonSymbolizer>
However, what is being outputted is:
<Symbolizer type="PolygonSymbolizerType">
... stuff
</Symbolizer>
Even when I try to do an XMLObject.substitute, it doesn't seem to be taking, as my casting afterwards throwing an exception:
SymbolizerType st = SymbolizerType.Factory.newInstance();
PolygonSymbolizerType polySymbol = (PolygonSymbolizerType) st.substitute(new QName("http://www.opengis.net/se", "PolygonSymbolizer"), PolygonSymbolizerType.type);
Any ideas on how I can get it to use the sub-element instead of the super-element?