| Additional Resources | |
TRichViewXML
Developer: J. Banzet, Sergey Tkachenko
Version: v1.31
Frameworks: VCL, FireMonkey (Windows, macOS, Android), LCL (Windows)
License: Free addon for TRichView v20.4+ (license agreement)
Source code: included in the installation of TRichView and ScaleRichView.
TRichViewXML (RVXML) is a RichView addon for saving/loading XML files.
XML can be used to replace RichView's own file format (RVF).
TRichViewXML has methods for loading and saving XML to/from files and streams. Moreover, it can insert XML in RichViewEdit (this operation can be undone/redone).
RVXML files contain full information, including text and paragraph styles, Unicode text and special RichView item types, such as images from ImageLists and Delphi controls.
TRichViewXML can save and load images either to/from external files or directly to/from XML.
TRichViewXML has its own XML parser and does not use external libraries.
RVXML files are not XHML files, the format was specially designed to store RichView documents efficiently.
XML format has a lot of advantages, such as:
- XML is an universally recognized file format
- XML is a text format, so you can edit XML-files in every text editor (for example, in Windows Notepad)
- you can view XML in every XML-compatibile Web Browser (for example, in new versions of Internet Explorer or Mozilla)
- if you know the rules of general XML syntax (it isn't too difficult), you can write RVXML files yourself with ease
- XML is a human-readable format
Below is an example of RVXML file:
<book>
<style>
<font name="Times New Roman" name="MyFont" />
<para name="normal" />
<para align="center" name="centered" />
</style>
<document>
<text parastyle="centered">Hello</text>
<text>Here is a XML file</text>
</document>
</book>
Documentation is provided in RVXML format.
A utility to view RVXML documentation is included (see screenshot below). It can be considered as a demo project — a nice example how to create a browser of XML documentation with a couple lines of code.
Additional information: How to save two documents in a single XML file
|