    

 ## On this page

  

 

 # toXMLFile

 Last update: 16.07.2025 

public [toXMLFile](to-x-m-l-file.md)(fileName: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html))

save data history data as an XML file

#### Parameters

fileNamethe file to turn into an XML file in String format#### Throws

[ModelCenterException](../-model-center-exception/index.md)public [toXMLFile](to-x-m-l-file.md)(fileName: [String](https://docs.oracle.com/javase/8/docs/api/java/lang/String.html), includeRunData: [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html))

save data history data as an XML file

#### Parameters

fileNamethe file to turn into an XML file in String formatincludeRunDatawhether or not to include run data into the XML#### Throws

[ModelCenterException](../-model-center-exception/index.md)