API

This page describes  MxWidgetStyle class methods that can be used to serialize/deserialize styles in XML format. For the full list of  MxWidgetStyle and  MxChartStyle methods click on the corresponding class name.

public static MxWidgetStyle read(InputStream is, String parser)
Creates new widget style from the stream using provided parser (or null for the built-in parser). This function will attempt to auto-detect the stream encoding by using its first bytes.

public static MxWidgetStyle read(String xml, String parser)
Creates new widget style from xml using provided parser (or null for the built-in parser)

public String toXML(String encoding, boolean expanded)
Returns a string representation of this style with XML's encoding attribute set to encoding. Note that when saving this string into a file, you will need to use the same encoding as was used to produce this XML

public String toXML()
Returns a string representation of this style with UTF-8 encoding