To apply XML to a graph, you call one of the following methods of the graph:
public boolean setXML(java.lang.String xmlString, boolean reset) throws BIIOException, BISAXException, BIParseExceptionpublic boolean readXML(java.io.InputStream stream, boolean reset) throws BIIOException, BISAXException, BIParseException
When you call either of these methods, the reset
parameter specifies whether to
reset the properties of the graph to the default values before applying the XML to the graph.
The default values are the values that were the default in the version of the Graph bean that
produced the XML that this graph is applying.
If you want a graph that matches exactly the graph from which you created XML, and the XML
contains only the property values that are different from the default, then pass
true
as the reset
parameter.
If the XML contains only the property values that are different from the default values,
then you can also apply them to a modified graph. To do this, pass false
as the
reset
parameter.
If the XML contains all of the property values, then you should pass false
as
the reset
parameter. If you pass true
, then the graph resets all the
properties to the defaults and then sets all the properties from the XML. Setting the
properties twice degrades performance.