September 3, 2008

Serialize and Deserialize an Object Instance to XML

To serialize an object instance to XML, you need to use the XMLSerializer class’s Serialize method. The code snippet below demonstrates: XmlSerializer xmlSer = new XmlSerializer(objInstance.GetType());System.Text.StringBuilder sb = new System.Text.StringBuilder();System.IO.StringWriter

Build a Frame with a ScrollPane in JavaFX

What follows is a simple frame designed with the JavaFX scripting language. The frame also has a ScrollPane component. import javafx.ui.*;import javafx.ui.canvas.*;import javafx.ui.filter.*;import java.lang.System;Frame { centerOnScreen: true visible: true height: