Class TWPCustomXMLTree

Hierarchy

System.TObject | System.Classes.TPersistent | System.Classes.TComponent | WPXMLint.TWPCustomXMLInterface | TWPCustomXMLTree

Subclasses

WPLngCtr.TWPLanguageControl | WPXMLint.TWPXMLTree

Description for Class TWPCustomXMLInterface

Component to load and save an XML file. While loading and saving the tags, parameters and texts are created/provided by/to events. TWPCustomXMLTree - Component (based on TWPCustomXMLInterface) to load and save XML files to a tree representation stored in memory.
This is a basic XML Interface class. It was not created as an utility for a simple interface to XML for property definitions and to load and save XML/CSS format.

It provides the following intelligence:

reading

  • if a not matching end-tag is found it looks in the stack if it finds a previous start tag of this kind and if it does not it ignores the tag but reports and error Otherwise it automatically closes the not closed tags up to this position
  • if a comment is found it automatically removes the XML comments and spaces at the beginning and at the end.
  • In HTMLmode a few tags are detected to be closed, this are META, BR, HR and BASEFONT.
  • for each opened stack a new record is saved (DataSize). You can use this record to store data. When you get the close data event automatically the previous data record is available! You can use the Data in the OnReadText.

writing

  • Encoding is written
    • The comma separated list of CSS references is automatically written as xml-stylesheets
    • OpenTag automatically creates a empty record on the Stack The record must not contain any strings (shortstrings are ok). It is accessible using the function Data
    • CloseTag is able to automatically close several open tags until the tag which has the same name is found. This produces only an error if such a tag does not exist on the stack.

Properties

Methods

Events

OnBeginUpdate : Boolean= Boolean

OnEndUpdate : TNotifyEvent= procedure (Sender : TObject) of Object

Used or referenced by

-Function TWPXMLOneLevel.CopyTree(NewParent:TWPCustomXMLTree) : TWPXMLOneLevel