Category Archives: Text

Text and string processing

Interactive Session #9: Processing XML

Reading and interpreting XML data is performed through the System.Xml package. You need to create a new XmlDocument value and load the XML text into the XmlDocument. > open System.Xml;; > let txt = “<drawing><line><x>10.0</x><y>20.0</y><dx>50.0</dx> <dy>50.0</dy></line><circle><x>50.0</x><y>50.0</y><r>20.0</r> </circle></drawing>”;; val txt : … Continue reading

Posted in Getting Started, GUI, IO, Text | 1 Comment

Interactive Session #7: Text file I/O

Binary and text file access is provided through the module System.IO. The type File provides static methods to create, open, read and write files. File.CreateText creates a new file (if it exists already content is overwritten) in text mode. > … Continue reading

Posted in Getting Started, IO, Text | Leave a comment