Sign in Join
FPDoc Onlineexperiment

TXMLConfig class

In unit Laz2_XMLCfg

Implements a class used to access and maintain an XML configuration data file.

Declaration

pascal
TXMLConfig = class(TComponent)

Inheritance

  1. TXMLConfig
  2. TComponent
  3. TPersistent
  4. TObject

Descends from it: TPropStorageXMLConfig TRttiXMLConfig

Description

TXMLConfig is a TComponent descendant used to store configuration data using XML format. TXMLConfig is a simpler mechanism for accessing the content in an XML document. It uses path specifiers to describe the hierarchy of elements and attribute values, instead of focusing on DOM nodes. See the TXMLConfig Path Syntax topic for more information about path specifiers in TXMLConfig.

TXMLConfig provides method used to get or set the value for a path specifier in the XML document. Overloaded methods are includes to handle values using String, Integer, Extended, TRect, or Boolean data types. See the Using TXMLConfig topic for more information about using TXMLConfig.

See also

Properties

ModifiedpublicIndicates if the XML content in the class has been modified.
FilenamepublishedFile name used to read or write the XML content in the class instance.
DocumentpublishedXML document used for the class instance.
ReadFlagspublishedTXMLReaderFlags for the XML configuration file.
WriteFlagspublishedTXMLWriteFlags for the XML configuration file.

Methods

LoadedprotectedSignals that LCL component streaming has been completed.
ExtendedToStrprotectedConverts an extended value to its representation as a String.
StrToExtendedprotectedConverts the specified String value to an Extended data type.
SizeOfTypeInfoprotectedGets the number of bytes needed to store a value using the specified RTTI type.
ValueWithTypeInfoToStringprotectedGets the string representation for the specified value as the specified type.
StringToValueWithTypeInfoprotectedConverts the specified string value to a value using the specified type.
ReadXMLFileprotectedReads the XML content from the specified file into a TXMLDocument instance.
WriteXMLFileprotectedWrites XML configuration data in Document to the specified file name.
FreeDocprotectedFrees the TXMLDocument instance for the XML configuration file.
SetPathNodeCacheprotectedEnsures a DOM node is present in the internal cache for the class instance.
GetCachedPathNodeprotectedGets a cached DOM node starting at the specified position in the cache.
InvalidateCacheTilEndprotectedRemoves DOM nodes from the internal cache starting at the specified ordinal position.
InternalFindNodeprotectedSearches for the DOM node with the specified path, and updates the node cache.
InternalCleanNodeprotectedRemoves the specified node and all of its children from the Document.
FindChildNodeprotectedFinds (and optionally caches) a child node starting at the specified index position using the specified XPath node name and position.
CreatepublicConstructor for the class instance.
CreateCleanpublicAlternate constructor used to create the class without reading existing XML content in the specified file.
CreateWithSourcepublicAlternate constructor used to create the class using the XML content specified in Source.
DestroypublicDestructor for the class instance.
ClearpublicRemoves existing XML content in the Document property.
FlushpublicForces the XML content for the configuration file to be written to Filename.
ReadFromStreampublicReads the XML content in Document from the specified stream instance.
WriteToStreampublicWrites the XML content for the configuration file to the specified stream instance.
GetValuepublicGets the value from the DOM node at the specified path in the XML configuration file.
GetExtendedValuepublicGets the value for a DOM node at the specified path as an extended data type.
SetValuepublicSets the value in a DOM node at the specified path.
SetDeleteValuepublicUpdates or removes the value stored at the specified path.
SetExtendedValuepublicSets the value in the DOM node at the specified path using an extended data type.
SetDeleteExtendedValuepublicUpdates or removes the Extended value at the specified path.
DeletePathpublicDeletes the DOM node at the specified path in the Document.
DeleteValuepublicDeletes the value stored in the DOM node at the specified path.
FindNodepublicRetrieves the DOM node with the specified path.
HasPathpublicIndicates if a DOM node exists for the specified path.
HasChildPathspublicIndicates if the DOM node at the specified path has child nodes.
GetChildCountpublicGets the number of child nodes used in the DOM node at the specified path.
IsLegacyListpublicIndicates if the specified list was written using the format from a previous LazUtils version.
GetListItemCountpublicGets the number of values with the specified name found in the given path.
GetListItemXPathpublicGets the path specifier used to access a list item at the specified position.
InvalidatePathCachepublicRemoves cached DOM nodes for paths in the XML configuration file.

Fields

docprotectedInternal member with the TXMLDocument for the class instance.
FModifiedprotectedMember used to indicate the configuration file has been modified.
fDoNotLoadFromFileprotectedMember used to indicate that the data was created manually, and not loaded from a file or stream.
fAutoLoadFromSourceprotectedMember used to store String content loaded into the configuration file.
fPathCacheprotectedNot used/updated in the current implementation.
fPathNodeCacheprotectedMember used to cache DOM nodes accessed using paths in the class instance.

Types and constants

TDomNodeArrayprotectedDefines an array type used to store TDomNode instances.
TNodeCacheprotectedAdvanced record type used to implement an array-based TDomNode cache.

Inherited

From TComponent (73)

_AddRef _Release BeforeDestruction CanObserve ChangeName ComObject ComponentCount ComponentIndex Components ComponentState ComponentStyle DefineProperties DesignInfo DestroyComponents Destroying ExecuteAction FindComponent FreeNotification FreeOnRelease GetChildOwner GetChildParent GetChildren GetDeltaStreams GetEnumerator GetIDsOfNames GetNamePath GetObservers GetOwner GetParentComponent GetTypeInfo GetTypeInfoCount HasParent iicrGetComponent InsertComponent Invoke IsImplementorOf Loading Name Notification ObserverAdded Observers OnGetDeltaStreams Owner PaletteCreated QueryInterface ReadDeltaState ReadDeltaStream ReadState ReferenceInterface RemoveComponent RemoveFreeNotification RemoveFreeNotifications SafeCallException SetAncestor SetChildOrder SetDesigning SetDesignInstance SetInline SetName SetParentComponent SetSubComponent Tag ToString TToStringNameMode UpdateAction Updated UpdateRegistry Updating ValidateContainer ValidateInsert ValidateRename VCLComObject WriteState

From TPersistent (5)

Assign AssignTo FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (37)

AfterConstruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName StringMessageTable SystemHasExtendedRTTI UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.