[Lazarus] TSynMemo + TSynXMLSyn: How format a XML after load it?

Anthony Walter sysrpl at gmail.com
Wed Oct 28 16:03:37 CET 2015


Marcos, here are a few notes when working with Codebot.Text.Xml:

  * You can use IDocument.Load/Save to load and save Xml to and from files.
  * If the Xml text is in an invalid state, the IDocument will be empty.
  * Attempts to read an empty IDocument Text or Xml property return an
empty Xml doctype.
  * You can check if IDocument contains valid Xml by seeing if the root
node exists. ie: Document.Root <> nil
  * Alternately you can validate Xml using the XmlValidate function...

      function XmlValidate(const Xml: string): Boolean;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151028/497e7e6a/attachment-0003.html>


More information about the Lazarus mailing list