Copyright: Copyright (c) 2005-2007 HREF Tools Corp.


ZaphodsMap Library Documentation
ZaphodsMap Library for Object Pascal

•  Components

•  Classes

•  Methods

•  Constants

•  Types

•  Cross reference by Unit

This ZaphodsMap documentation is licensed under a Creative Commons Attribution 2.5 License and published by HREF Tools Corp. If you use ZaphodsMap, please mention zaphodsmap.com at least once in your software source and at least once in your software docu mentation. The latest version of this help file is maintained t http://www.zaphodsmap.com/pub/help/ZMHelp.hlp. Last updated: 4-Mar-2007 for ZaphodsMap v1.027.


ZaphodsMap Components

TZaphodsMap Component which implements the ZaphodsMap configuration system.

TZaphodsMapSetup Used within software installation programs to initialize aspects of ZM.

[ZaphodsMap Index]


Cross Reference by Unit for ZaphodsMap

•  NativeXml  -- Native Xml component for Object Pascal

•  ZaphodsMap  -- ZaphodsMap configuration system

•  ZaphodsMapSetup  -- Code to use when installing a product which uses ZaphodsMap

[ZaphodsMap Index]


ZaphodsMap Types

•  PBigByteArray

•  TBigByteArray

•  TBinaryEncodingType

•  TContextLocation

•  TContextType

•  TContextUsage

•  TErrorDetailAllowed

•  TErrorDetailAllowedSet

•  TKeyboxLocation

•  TKeyboxUsed

•  TKeyedDetail

•  TLastNodeDetails

•  TLocalKeyboxLocation

•  TPointer

•  TReplaceFlags

•  TsdBufferedReadStream

•  TsdBufferedWriteStream

•  TsdCodecStream

•  TsdStreamModeType

•  TSeekOrigin

•  TStringEncodingType

•  TUserNameType

•  TUserNameUsage  Indicates whether nodes should be found based information in the user attribute.

•  TXmlCompareOption

•  TXmlCompareOptions

•  TXmlElementType

•  TXmlFormatType

•  TXmlNode

•  TXPathAttribute

•  TXPathAttributes

•  TXPathElement

•  TXPathElements

•  TZaphodKeyArray

•  TZaphodKeyType

•  TZaphodNode

•  widestring

[ZaphodsMap Index]


ZaphodsMap Constants

•  cBranchContextFile

•  cGlobalSettingsFile

•  cLocalContextFile

•  cNativeXmlVersion

•  cW3OrgXMLSchemaInstanceURL

•  cZMBranchKeyboxFileName

•  cZMContextFileName

•  cZMContextRootNodeName

•  cZMContextXsdURL

•  cZMDesignURL

•  cZMGlobalFileName

•  cZMGlobalRootNodeName

•  cZMGlobalXsdURL

•  cZMKeyboxRootNodeName

•  cZMKeyboxXsdURL

•  cZMLocalKeyboxSuffix

•  cZMXslURL

•  soBeginning

•  soCurrent

•  soEnd

•  xcAll

[ZaphodsMap Index]


ZaphodsMap Methods

•  AddControlChars

•  AnsiExtractQuotedStr

•  AnsiPos

•  AnsiQuotedStr

•  DecodeBase64

•  DecodeBinHex

•  DirectoryCount

•  EncodeBase64

•  EncodeBinHex

•  EscapeString

•  FileAndDirectoryCount

•  FindString

•  FreeAndNil

•  GetAsVariant

•  GetZMKeyProperties

•  ParseAttributes

•  QuoteString

•  RemoveControlChars

•  sdAnsiToUtf8

•  sdDateTimeFromString

•  sdDateTimeFromStringDefault

•  sdDateTimeToString

•  sdUnicodeToUtf8

•  sdUtf8ToAnsi

•  sdUtf8ToUnicode

•  TrimPos

•  UnEscapeStringANSI

•  UnEscapeStringUTF8

•  UnQuoteString

•  XPathAttr

•  XPathBuilder

•  XPathOfNode

•  ZaphodAssertDirectoryFor

•  ZaphodException

•  ZaphodExceptionFmt

•  ZaphodKeyedFileName  ... Retrieves a filespec (path and filename) from a keybox.

•  ZaphodKeyedFileZNodeAttr  ... Find a node and retrieve a string from an attribute, using common ZM features.

•  ZaphodKeyedFolder  ... Retrieves a folder name from a keybox.

•  ZaphodKeyedValue  ... Retrieves a string from a keybox.

•  ZaphodMinimalXMLDoc  ... Creates a string which is a iminimalist XML document.

[ZaphodsMap Index]


ZaphodsMap Classes

Classes marked * are registered as components.

•  EZaphodException

•  TNativeXml  ... A cross-platform class for creating, maintaining and using an Xml document.

•  TsdAnsiStream

•  TsdBufferedReadStream

•  TsdBufferedStream

•  TsdBufferedWriteStream

•  TsdCodecStream

•  TsdUtf8Stream

•  TXmlNode  ... A node in an XML document as used within TNativeXml.

•  TXmlNodeList

•  TZaphodKey  ... Based on ZMKeybox.xml, a key can point to a file, folder or string value.

•  TZaphodsMap  ... Component which implements the ZaphodsMap configuration system. *

•  TZaphodsMapAdmin  Used within the ZMAdmin utility to facilitate administration of config files.

•  TZaphodsMapSetup  ... Used within software installation programs to initialize aspects of ZM. *

•  TZaphodXmlDoc  An XML document (TNativeXml) with extra features for use with ZaphodsMap.

•  TZaphodXmlDocAdmin  ... A variation on TZaphodXmlDoc, required by TZaphodsMapAdmin.

[ZaphodsMap Index]


EZaphodException Class

| Class

Declaration

EZaphodException = class(Exception)

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


cNativeXmlVersion Constant

Declaration

cNativeXmlVersion = '2.20';

Unit

NativeXml

Description

[ZaphodsMap Index]


TReplaceFlags Type

Declaration

TReplaceFlags = set of (rfreplaceall, rfignorecase);

Unit

NativeXml

Description

[ZaphodsMap Index]


widestring Type

Declaration

widestring = string;

Unit

NativeXml

Description

[ZaphodsMap Index]


AnsiPos Method

Declaration

function AnsiPos(const Substr, S: string): Integer;

Unit

NativeXml

Description

[ZaphodsMap Index]


AnsiQuotedStr Method

Declaration

function AnsiQuotedStr(const S: string; Quote: Char): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


AnsiExtractQuotedStr Method

Declaration

function AnsiExtractQuotedStr(var Src: PChar; Quote: Char): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


FreeAndNil Method

Declaration

procedure FreeAndNil(var Obj);

Unit

NativeXml

Description

[ZaphodsMap Index]


TPointer Type

Declaration

TPointer = Pointer;

Unit

NativeXml

Description

[ZaphodsMap Index]


TSeekOrigin Type

Declaration

TSeekOrigin = Word;

Unit

NativeXml

Description

[ZaphodsMap Index]


soBeginning Constant

Declaration

soBeginning = soFromBeginning;

Unit

NativeXml

Description

[ZaphodsMap Index]


soCurrent Constant

Declaration

soCurrent = soFromCurrent;

Unit

NativeXml

Description

[ZaphodsMap Index]


soEnd Constant

Declaration

soEnd = soFromEnd;

Unit

NativeXml

Description

[ZaphodsMap Index]


TXmlFormatType Type

Declaration

TXmlFormatType = ( xfReadable, xfCompact );

Unit

NativeXml

Description

[ZaphodsMap Index]


TXmlElementType Type

Declaration

TXmlElementType = ( xeNormal, xeComment, xeCData, xeDeclaration, xeStylesheet, xeDoctype, xeElement, xeAttList, xeEntity, xeNotation, xeExclam, xeQuestion, xeCharData, xeUnknown );

Unit

NativeXml

Description

[ZaphodsMap Index]


TBinaryEncodingType Type

Declaration

TBinaryEncodingType = ( xbeBinHex, xbeBase64 );

Unit

NativeXml

Description

[ZaphodsMap Index]


TStringEncodingType Type

Declaration

TStringEncodingType = ( se8Bit, seUCS4BE, seUCS4LE, seUCS4_2143, seUCS4_3412, se16BitBE, se16BitLE, seUTF8, seUTF16BE, seUTF16LE, seEBCDIC );

Unit

NativeXml

Description

[ZaphodsMap Index]


TXmlCompareOption Type

Declaration

TXmlCompareOption = ( xcNodeName, xcNodeType, xcNodeValue, xcAttribCount, xcAttribNames, xcAttribValues, xcChildCount, xcChildNames, xcChildValues, xcRecursive );

Unit

NativeXml

Description

[ZaphodsMap Index]


TXmlCompareOptions Type

Declaration

TXmlCompareOptions = set of txmlcompareoption;

Unit

NativeXml

Description

[ZaphodsMap Index]


xcAll Constant

Declaration

xcAll: TXmlCompareOptions = [xcNodeName, xcNodeType, xcNodeValue, xcAttribCount, xcAttribNames, xcAttribValues, xcChildCount, xcChildNames, xcChildValues, xcRecursive];

Unit

NativeXml

Description

[ZaphodsMap Index]


TXmlNode Type

Declaration

TXmlNode = class;

Unit

NativeXml

Description

[ZaphodsMap Index]


TsdCodecStream Type

Declaration

TsdCodecStream = class;

Unit

NativeXml

Description

[ZaphodsMap Index]


TsdStreamModeType Type

Declaration

TsdStreamModeType = ( umUnknown , umRead, umWrite );

Unit

NativeXml

Description

[ZaphodsMap Index]


TBigByteArray Type

Declaration

TBigByteArray = array[0..MaxInt - 1] of byte;

Unit

NativeXml

Description

[ZaphodsMap Index]


PBigByteArray Type

Declaration

PBigByteArray = ^TBigByteArray;

Unit

NativeXml

Description

[ZaphodsMap Index]


TsdBufferedReadStream Type

Declaration

TsdBufferedReadStream = TsdBufferedStream;

Unit

NativeXml

Description

[ZaphodsMap Index]


TsdBufferedWriteStream Type

Declaration

TsdBufferedWriteStream = TsdBufferedStream;

Unit

NativeXml

Description

[ZaphodsMap Index]


EscapeString Method

Declaration

function EscapeString(const AValue: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


UnEscapeStringUTF8 Method

Declaration

function UnEscapeStringUTF8(const AValue: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


UnEscapeStringANSI Method

Declaration

function UnEscapeStringANSI(const AValue: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


QuoteString Method

Declaration

function QuoteString(const AValue: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


UnQuoteString Method

Declaration

function UnQuoteString(const AValue: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


AddControlChars Method

Declaration

function AddControlChars(const AValue: string; const Chars: string; Interval: integer): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


RemoveControlChars Method

Declaration

function RemoveControlChars(const AValue: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


sdDateTimeFromString Method

Declaration

function sdDateTimeFromString(const ADate: string): TDateTime;

Unit

NativeXml

Description

[ZaphodsMap Index]


sdDateTimeFromStringDefault Method

Declaration

function sdDateTimeFromStringDefault(const ADate: string; ADefault: TDateTime): TDateTime;

Unit

NativeXml

Description

[ZaphodsMap Index]


sdDateTimeToString Method

Declaration

function sdDateTimeToString(ADate: TDateTime): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


sdUnicodeToUtf8 Method

Declaration

function sdUnicodeToUtf8(const W: widestring): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


sdAnsiToUtf8 Method

Declaration

function sdAnsiToUtf8(const S: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


sdUtf8ToUnicode Method

Declaration

function sdUtf8ToUnicode(const S: string): widestring;

Unit

NativeXml

Description

[ZaphodsMap Index]


sdUtf8ToAnsi Method

Declaration

function sdUtf8ToAnsi(const S: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


FindString Method

Declaration

function FindString(const SubString: string; const S: string; Start, Close: integer; var APos: integer): boolean;

Unit

NativeXml

Description

[ZaphodsMap Index]


ParseAttributes Method

Declaration

procedure ParseAttributes(const AValue: string; Start, Close: integer; Attributes: TStrings);

Unit

NativeXml

Description

[ZaphodsMap Index]


TrimPos Method

Declaration

function TrimPos(const AValue: string; var Start, Close: integer): boolean;

Unit

NativeXml

Description

[ZaphodsMap Index]


EncodeBase64 Method

Declaration

function EncodeBase64(const Source: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


DecodeBase64 Method

Declaration

function DecodeBase64(const Source: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


EncodeBinHex Method

Declaration

function EncodeBinHex(const Source: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


DecodeBinHex Method

Declaration

function DecodeBinHex(const Source: string): string;

Unit

NativeXml

Description

[ZaphodsMap Index]


cZMGlobalFileName Constant

Declaration

cZMGlobalFileName = 'ZMGlobal.xml';

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


cZMGlobalRootNodeName Constant

Declaration

cZMGlobalRootNodeName = 'ZMGlobalSettings';

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


cZMBranchKeyboxFileName Constant

Declaration

cZMBranchKeyboxFileName = 'ZMKeybox.xml';

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


cZMLocalKeyboxSuffix Constant

Declaration

cZMLocalKeyboxSuffix = 'ZMKeybox.xml';

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


cZMKeyboxRootNodeName Constant

Declaration

cZMKeyboxRootNodeName = 'ZMKeybox';

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


cZMContextFileName Constant

Declaration

cZMContextFileName = 'ZMContext.xml';

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


cZMContextRootNodeName Constant

Declaration

cZMContextRootNodeName = 'ZMContext';

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


cZMDesignURL Constant

Declaration

cZMDesignURL = 'http://www.ZaphodsMap.com/zmdesign';

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


cZMXslURL Constant

Declaration

cZMXslURL = cZMDesignURL + '/css/ZaphodsMap.xsl';

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


cW3OrgXMLSchemaInstanceURL Constant

Declaration

cW3OrgXMLSchemaInstanceURL = 'http://www.w3.org/2001/XMLSchema-instance';

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TKeyboxUsed Type

Declaration

TKeyboxUsed = (kuNone , kuBranchKeybox, kuLocalKeybox, kuTemp);

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TLocalKeyboxLocation Type

Declaration

TLocalKeyboxLocation = (klExecutablePath , klLibraryPath, klCustom);

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TZaphodKeyType Type

Declaration

TZaphodKeyType = (ktFile , ktFolder, ktValue);

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TContextUsage Type

Declaration

TContextUsage = (cxNone , cxOptional, cxRequired);

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TContextType Type

Declaration

TContextType = (cxDefault , cxCustom);

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TUserNameUsage Type

Declaration

TUserNameUsage = (usrNone , usrOptional, usrRequired);

Unit

ZaphodsMap

Description

Indicates whether nodes should be found based information in the user attribute.

[ZaphodsMap Index]


TUserNameType Type

Declaration

TUserNameType = (usrDefault , usrCustom);

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TErrorDetailAllowed Type

Declaration

TErrorDetailAllowed = (edFileNames , edFilePathsAndNames, edComponentNames, edMethodNames);

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TErrorDetailAllowedSet Type

Declaration

TErrorDetailAllowedSet = set of terrordetailallowed;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TXPathAttribute Type

Declaration

TXPathAttribute = record xaDefinition: string;xaDefinitionStartAt: Integer;xaAttributeID: string;xaAttributeValue: string;end;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TXPathAttributes Type

Declaration

TXPathAttributes = array of TXPathAttribute;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TXPathElement Type

Declaration

TXPathElement = record xeTagName: string;xeTagPos: Integer;xeAttributes: TXPathAttributes ;end;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TXPathElements Type

Declaration

TXPathElements = array of TXPathElement ;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TZaphodNode Type

Declaration

TZaphodNode = TXmlNode;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TLastNodeDetails Type

Declaration

TLastNodeDetails = record lndLastError: string;lndLastNode: TZaphodNode;lndLastNodeAttrFound: Boolean;lndLastNodeContextUsage: TContextUsage;lndLastNodeContextUsed: Boolean;lndLastNodeContextValue: string;lndLastNodeSelectAttrID: string;end;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TKeyedDetail Type

Declaration

TKeyedDetail = record KeyGroupName: string;KeyType: TZaphodKeyType;KeyName: string;ContextType: TContextType;ContextUsage: TContextUsage;ContextValue: string;UserNameType: TUserNameType;UserNameUsage: TUserNameUsage;UserNameValue: string;DefaultValue: str ing;CallingMethod: string;KeyDesc: string;KeyBoxUsed: TKeyboxUsed;ContextUsed: Boolean;UserNameUsed: Boolean;ExceptionOccurred: Boolean;ErrorMessage: string;end;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


TZaphodKeyArray Type

Declaration

TZaphodKeyArray = array of TZaphodKey;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


GetAsVariant Method

Declaration

function GetAsVariant(S: string; const Default: Variant; out ErrorMessage: string): Variant;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


GetZMKeyProperties Method

Declaration

procedure GetZMKeyProperties(const AKeyType: TZaphodKeyType; var KeyID, AttributeID: string);

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


XPathAttr Method

Declaration

function XPathAttr(const AttributeID, AttributeValue: string):string;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


XPathBuilder Method

Declaration

function XPathBuilder(const Args: array of const): string;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


XPathOfNode Method

Declaration

function XPathOfNode(Node: TXmlNode): string;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


ZaphodKeyedFileName Method

Declaration

function ZaphodKeyedFileName(const ZaphodBranch, AKeyGroupName, AKeyName: string; const AContextUsage: TContextUsage; const AUserNameUsage: TUserNameUsage; const DefaultFileName: string; out KeyedDetail: TKeyedDetail): string;

Unit

ZaphodsMap

Description

Retrieves a filespec (path and filename) from a keybox.

This function enables you to retrieve a file specification (full path and filename) from an XML file, without instantiating TZaphodsMap at all.

Example: Assumptions

These are the assumptions behind our example:

•  ZaphodsMap env var points to c:\data\

•  The branch to be used is ACompany\AProduct.

•  Context is important.

•  Username is not applicable.

Example: ZMKeybox.xml

This is the content of c:\data\ACompany\AProduct\ZMKeybox.xml. Note that the Key2File name is Security, and the KeyGroup name is AProductArea.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://www.ZaphodsMap.com/zmdesign/css/ZaphodsMap.xsl"?>
<ZMKeybox xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.zaphodsmap.com/zmdesign/xsd/ZMKeybox200606.xsd">
  <KeyGroups>
    <KeyGroup name="AProductArea">
      <Keys>
        <Key2File name="Security" filename="c:\secretpath\security.xml" />
      </Keys>
    </KeyGroup>
  </KeyGroups>
</ZMKeybox>

Example: Delphi Code

This is how you would retrieve the filename:

uses
  ZaphodsMap;

var
  S: string;
  KeyedDetail: TKeyedDetail;
begin
  S := ZaphodKeyedFileName(
    'ACompany\AProduct', // branch
    'AProductArea',      // key group name
    'Security',            // key2file name
    cxOptional,          // use of context is optional
    usrNone,             // no need for username
    '',                  // default result
    KeyedDetail);
  if KeyedDetail.ErrorMessage <> '' then
    ShowMessage(KeyedDetail.ErrorMessage)
  else
    ShowMessage('Result is ' + S);
end;

Example: Result

The answer would be "c:\secretpath\security.xml".

[ZaphodsMap Index]


ZaphodKeyedFolder Method

Declaration

function ZaphodKeyedFolder(const ZaphodBranch, AKeyGroupName, AKeyName: string; const AContextUsage: TContextUsage; const AUserNameUsage: TUserNameUsage; const DefaultFolderName: string; out KeyedDetail: TKeyedDetail): string;

Unit

ZaphodsMap

Description

Retrieves a folder name from a keybox.

This function enables you to retrieve a folder name (directory) from an XML file, without instantiating TZaphodsMap.

Example: Assumptions

These are the assumptions behind our example:

•  ZaphodsMap env var points to c:\data\

•  The branch to be used is ACompany\AProduct.

•  Context is important.

•  Username is not applicable.

Example: ZMKeybox.xml

This is the content of c:\data\ACompany\AProduct\ZMKeybox.xml. Note that the Key2Folder name is Database, and the KeyGroup name is AProductArea.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://www.ZaphodsMap.com/zmdesign/css/ZaphodsMap.xsl"?>
<ZMKeybox xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.zaphodsmap.com/zmdesign/xsd/ZMKeybox200606.xsd">
  <KeyGroups>
    <KeyGroup name="AProductArea">
      <Keys>
        <Key2Folder name="Database" folder="c:\data\firebirdsql\" />
      </Keys>
    </KeyGroup>
  </KeyGroups>
</ZMKeybox>

Example: Delphi Code

This is how you would retrieve the folder name:

uses
  ZaphodsMap;

var
  S: string;
  KeyedDetail: TKeyedDetail;
begin
  S := ZaphodKeyedFileName(
    'ACompany\AProduct', // branch
    'AProductArea',      // key group name
    'Database',            // key2folder name
    cxOptional,          // use of context is optional
    usrNone,             // no need for username
    '',                  // default result
    KeyedDetail);
  if KeyedDetail.ErrorMessage <> '' then
    ShowMessage(KeyedDetail.ErrorMessage)
  else
    ShowMessage('Result is ' + S);
end;

Example: Result

The answer would be "c:\data\firebirdsql\".

[ZaphodsMap Index]


ZaphodKeyedValue Method

Declaration

function ZaphodKeyedValue(const ZaphodBranch, AKeyGroupName, AKeyName: string; const AContextUsage: TContextUsage; const AUserNameUsage: TUserNameUsage; const DefaultValue: string; out KeyedDetail: TKeyedDetail): string;

Unit

ZaphodsMap

Description

Retrieves a string from a keybox.

This function enables you to retrieve a string setting from an XML file, without instantiating TZaphodsMap.

Example: Assumptions

These are the assumptions behind our example:

•  ZaphodsMap env var points to c:\data\

•  The branch to be used is ACompany\AProduct.

•  Context is important.

•  Username is not applicable.

Example: ZMKeybox.xml

This is the content of c:\data\ACompany\AProduct\ZMKeybox.xml. Note that the Key2Value name is FtpHost, and the KeyGroup name is AProductArea.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://www.ZaphodsMap.com/zmdesign/css/ZaphodsMap.xsl"?>
<ZMKeybox xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.zaphodsmap.com/zmdesign/xsd/ZMKeybox200606.xsd">
  <KeyGroups>
    <KeyGroup name="AProductArea">
      <Keys>
        <Key2Value name="FtpHost" value="ftp.codegear.com" />
      </Keys>
    </KeyGroup>
  </KeyGroups>
</ZMKeybox>

Example: Delphi Code

This is how you would retrieve the string:

uses
  ZaphodsMap;

var
  S: string;
  KeyedDetail: TKeyedDetail;
begin
  S := ZaphodKeyedValue(
    'ACompany\AProduct', // branch
    'AProductArea',      // key group name
    'FtpHost',            // key2value name
    cxOptional,          // use of context is optional
    usrNone,             // no need for username
    '',                  // default result
    KeyedDetail);
  if KeyedDetail.ErrorMessage <> '' then
    ShowMessage(KeyedDetail.ErrorMessage)
  else
    ShowMessage('Result is ' + S);
end;

Example: Result

The answer would be "ftp.codegear.com".

[ZaphodsMap Index]


ZaphodKeyedFileZNodeAttr Method

Declaration

function ZaphodKeyedFileZNodeAttr(const ZaphodBranch, AKeyGroupName, AKeyName, KeyedFileRootName: string; XPath: array of const; const AContextUsage: TContextUsage; const AUserNameUsage: TUserNameUsage; const AttributeID: string; const DefaultResult: Variant; out Warning: string): Variant;

Unit

ZaphodsMap

Description

Find a node and retrieve a string from an attribute, using common ZM features.

This function enables you to retrieve a single value from an XML file, without instantiating TZaphodsMap at all. It is not the fastest method to use when many values must be retrieved, but it is the simplest.

Example: Assumptions

These are the assumptions behind our example:

•  ZaphodsMap env var points to c:\data\

•  The branch to be used is ACompany\AProduct.

•  Context is important.

•  Username is not applicable.

Example: ZMKeybox.xml

This is the content of c:\data\ACompany\AProduct\ZMKeybox.xml. Note that the Key2File name is Master, and the KeyGroup name is AProductArea.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://www.ZaphodsMap.com/zmdesign/css/ZaphodsMap.xsl"?>
<ZMKeybox xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.zaphodsmap.com/zmdesign/xsd/ZMKeybox200606.xsd">
  <KeyGroups>
    <KeyGroup name="AProductArea">
      <Keys>
        <Key2File name="Master" filename="c:\path\master.xml" />
      </Keys>
    </KeyGroup>
  </KeyGroups>
</ZMKeybox>

Example: Keyed Configuration File

This is the content of c:\path\master.xml :

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://www.ZaphodsMap.com/zmdesign/css/ZaphodsMap.xsl"?>
<AnyConfig>
  <A>
    <B>
      <C setting="hello world" />
      <C setting="hello family" context="home" />
    </B>
  </A>
</AnyConfig>

Example: Delphi Code

This is how you would retrieve the value of the attribute named setting:

uses
  ZaphodsMap;

var
  S: string;
  Warning: string;
begin
  S := ZaphodKeyedFileZNodeAttr(
    'ACompany\AProduct', // branch
    'AProductArea',      // key group name
    'Master',            // key2file name
    'AnyConfig',         // root tag in xml of loaded xml config file
    ['A', 'B', 'C'],     // xpath to the node we want to find
    cxOptional,          // use of context is optional
    usrNone,             // no need for username
    'setting',           // name of the attribute to retrieve
    '',                  // default result
    Warning);
  if Warning <> '' then
    ShowMessage(Warning)
  else
    ShowMessage('Result is ' + S);
end;

Example: Result

On a computer where the DefaultMapContext equals "home", the answer would be "hello family". On all other computers, the answer would be "hello world".

[ZaphodsMap Index]


ZaphodMinimalXMLDoc Method

Declaration

function ZaphodMinimalXMLDoc(const XSLURL, RootNode, XSDURL, Middle: string): string;

Unit

ZaphodsMap

Description

Creates a string which is a iminimalist XML document.

•  XSLURL: the style sheet URL, e.g. http://www.ZaphodsMap.com/zmdesign/css/ZaphodsMap.xsl.

•  RootNode: the name of the top root node within the XML document, e.g. Configuration

•  XSDURL: the XSD file which defines the structure of the XML document

•  Middle: any additional content for the file

Example Usage

The following code:

var
  S: string;
begin
   S := ZaphodMinimalXMLDoc(cZMXslURL, 'Configuration', '', '<Setting name="FtpHost" value="ftp.codegear.com" />');

would generate this XML document:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://www.ZaphodsMap.com/zmdesign/css/ZaphodsMap.xsl"?>
<Configuration>
  <Setting name="FtpHost" value="ftp.codegear.com" />
</Configuration>

[ZaphodsMap Index]


ZaphodAssertDirectoryFor Method

Declaration

function ZaphodAssertDirectoryFor(const FilePathAndNameOrDirPlusDelim: string; var ErrorMessage: string): Boolean;

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


ZaphodException Method

Declaration

procedure ZaphodException(const AMessage: string; const MethodName: string; Component: TComponent = nil);

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


ZaphodExceptionFmt Method

Declaration

procedure ZaphodExceptionFmt(const AMessage: string; const Args: array of const; const MethodName: string; Component: TComponent = nil);

Unit

ZaphodsMap

Description

[ZaphodsMap Index]


cZMGlobalXsdURL Constant

Declaration

cZMGlobalXsdURL = cZMDesignURL + '/xsd/ZMGlobalSettings200605.xsd';

Unit

ZaphodsMapSetup

Description

[ZaphodsMap Index]


cZMContextXsdURL Constant

Declaration

cZMContextXsdURL = cZMDesignURL + '/xsd/ZMContext200605.xsd';

Unit

ZaphodsMapSetup

Description

[ZaphodsMap Index]


cZMKeyboxXsdURL Constant

Declaration

cZMKeyboxXsdURL = cZMDesignURL + '/xsd/ZMKeybox200606.xsd';

Unit

ZaphodsMapSetup

Description

[ZaphodsMap Index]


cBranchContextFile Constant

Declaration

cBranchContextFile = 'Branch-Context-File';

Unit

ZaphodsMapSetup

Description

[ZaphodsMap Index]


cLocalContextFile Constant

Declaration

cLocalContextFile = 'Local-Context-File';

Unit

ZaphodsMapSetup

Description

[ZaphodsMap Index]


cGlobalSettingsFile Constant

Declaration

cGlobalSettingsFile = 'Global-Settings-File';

Unit

ZaphodsMapSetup

Description

[ZaphodsMap Index]


TKeyboxLocation Type

Declaration

TKeyboxLocation = (klBranch , klLocal);

Unit

ZaphodsMapSetup

Description

[ZaphodsMap Index]


TContextLocation Type

Declaration

TContextLocation = (clBranch , clLocal);

Unit

ZaphodsMapSetup

Description

[ZaphodsMap Index]


DirectoryCount Method

Declaration

function DirectoryCount(const Path: string): Integer;

Unit

ZaphodsMapSetup

Description

[ZaphodsMap Index]


FileAndDirectoryCount Method

Declaration

function FileAndDirectoryCount(const Path: string): Integer;

Unit

ZaphodsMapSetup

Description

[ZaphodsMap Index]


TNativeXml Class

| Class | Properties | Methods | Events |

Declaration

TNativeXml = class(TPersistent)

Unit

NativeXml

Description

A cross-platform class for creating, maintaining and using an Xml document.

Licensing

The TNativeXml component was created by simdesign  in the Netherlands. It is distributed in object (DCU) form by HREF Tools Corp., with explicit permission from the original author. Full object pascal source is available through the author.

Platforms

The TNativeXml component works with Delphi for win32, Delphi for Dot Net, and Kylix 3.

[ZaphodsMap Index]


Create Method of TNativeXml
Create Method

Declaration

Public
constructor Create; virtual;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


CreateName Method of TNativeXml
CreateName Method

Declaration

Public
constructor CreateName(const ARootName: string); virtual;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


Destroy Method of TNativeXml
Destroy Method

Declaration

Public
destructor Destroy; override;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


Assign Method of TNativeXml
Assign Method

Declaration

Public
procedure Assign(Source: TPersistent); override;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


Clear Method of TNativeXml
Clear Method

Declaration

Public
procedure Clear; virtual;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


IsEmpty Method of TNativeXml
IsEmpty Method

Declaration

Public
function IsEmpty: boolean; virtual;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


LoadFromStream Method of TNativeXml
LoadFromStream Method

Declaration

Public
procedure LoadFromStream(Stream: TStream); virtual;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


LoadFromFile Method of TNativeXml
LoadFromFile Method

Declaration

Public
procedure LoadFromFile(const FileName: string); virtual;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


ReadFromString Method of TNativeXml
ReadFromString Method

Declaration

Public
procedure ReadFromString(const AValue: string); virtual;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


ResolveEntityReferences Method of TNativeXml
ResolveEntityReferences Method

Declaration

Public
procedure ResolveEntityReferences;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


SaveToStream Method of TNativeXml
SaveToStream Method

Declaration

Public
procedure SaveToStream(Stream: TStream); virtual;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


SaveToFile Method of TNativeXml
SaveToFile Method

Declaration

Public
procedure SaveToFile(const FileName: string); virtual;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


WriteToString Method of TNativeXml
WriteToString Method

Declaration

Public
function WriteToString: string; virtual;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


AbortParsing Property of TNativeXml
AbortParsing Property

Declaration

Public
property AbortParsing: boolean read FAbortParsing write FAbortParsing;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


BinaryEncoding Property of TNativeXml
BinaryEncoding Property

Declaration

Public
property BinaryEncoding: TBinaryEncodingType read FBinaryEncoding write FBinaryEncoding;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


CommentString Property of TNativeXml
CommentString Property

Declaration

Public
property CommentString: string read GetCommentString write SetCommentString;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


DropCommentsOnParse Property of TNativeXml
DropCommentsOnParse Property

Declaration

Public
property DropCommentsOnParse: boolean read FDropCommentsOnParse write FDropCommentsOnParse;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


EncodingString Property of TNativeXml
EncodingString Property

Declaration

Public
property EncodingString: string read GetEncodingString write SetEncodingString;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


EntityByName Property of TNativeXml
EntityByName Property

Declaration

Public
property EntityByName[AName: string]: string read GetEntityByName;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


ExternalEncoding Property of TNativeXml
ExternalEncoding Property

Declaration

Public
property ExternalEncoding: TStringEncodingType  read FExternalEncoding write FExternalEncoding;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


IndentString Property of TNativeXml
IndentString Property

Declaration

Public
property IndentString: string read FIndentString write FIndentString;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


Root Property of TNativeXml
Root Property

Declaration

Public
property Root: TXmlNode read GetRoot;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


RootNodeList Property of TNativeXml
RootNodeList Property

Declaration

Public
property RootNodeList: TXmlNode read FRootNodes;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


StyleSheetString Property of TNativeXml
StyleSheetString Property

Declaration

Public
property StyleSheetString: string read GetStyleSheetString write SetStyleSheetString;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


UseFullNodes Property of TNativeXml
UseFullNodes Property

Declaration

Public
property UseFullNodes: boolean read FUseFullNodes write FUseFullNodes;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


Utf8Encoded Property of TNativeXml
Utf8Encoded Property

Declaration

Public
property Utf8Encoded: boolean read FUtf8Encoded write FUtf8Encoded;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


VersionString Property of TNativeXml
VersionString Property

Declaration

Public
property VersionString: string read GetVersionString write SetVersionString;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


WriteOnDefault Property of TNativeXml
WriteOnDefault Property

Declaration

Public
property WriteOnDefault: boolean read FWriteOnDefault write FWriteOnDefault;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


XmlFormat Property of TNativeXml
XmlFormat Property

Declaration

Public
property XmlFormat: TXmlFormatType read FXmlFormat write FXmlFormat;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


ParserWarnings Property of TNativeXml
ParserWarnings Property

Declaration

Public
property ParserWarnings: boolean read FParserWarnings write FParserWarnings;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


SortAttributes Property of TNativeXml
SortAttributes Property

Declaration

Public
property SortAttributes: boolean read FSortAttributes write FSortAttributes;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


OnNodeCompare Event of TNativeXml
OnNodeCompare Event

Declaration

Public
property OnNodeCompare: TXmlNodeCompareEvent read FOnNodeCompare write FOnNodeCompare;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


OnNodeNew Event of TNativeXml
OnNodeNew Event

Declaration

Public
property OnNodeNew: TXmlNodeEvent read FOnNodeNew write FOnNodeNew;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


OnNodeLoaded Event of TNativeXml
OnNodeLoaded Event

Declaration

Public
property OnNodeLoaded: TXmlNodeEvent read FOnNodeLoaded write FOnNodeLoaded;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


OnProgress Event of TNativeXml
OnProgress Event

Declaration

Public
property OnProgress: TXmlProgressEvent read FOnProgress write FOnProgress;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


OnUnicodeLoss Event of TNativeXml
OnUnicodeLoss Event

Declaration

Public
property OnUnicodeLoss: TNotifyEvent read FOnUnicodeLoss write FOnUnicodeLoss;

Applies to

TNativeXml

Description

[ZaphodsMap Index]


TNativeXml Events

| Class | Properties | Methods | Events |

Public

• OnNodeCompare

• OnNodeLoaded

• OnNodeNew

• OnProgress

• OnUnicodeLoss

[ZaphodsMap Index]


TNativeXml Methods

| Class | Properties | Methods | Events |

Public

• Assign

• Clear

• Create

• CreateName

• Destroy

• IsEmpty

• LoadFromFile

• LoadFromStream

• ReadFromString

• ResolveEntityReferences

• SaveToFile

• SaveToStream

• WriteToString

[ZaphodsMap Index]


TNativeXml Properties

| Class | Properties | Methods | Events |

Public

• AbortParsing

• BinaryEncoding

• CommentString

• DropCommentsOnParse

• EncodingString

• EntityByName

• ExternalEncoding

• IndentString

• ParserWarnings

• Root

• RootNodeList

• SortAttributes

• StyleSheetString

• UseFullNodes

• Utf8Encoded

• VersionString

• WriteOnDefault

• XmlFormat

[ZaphodsMap Index]


TsdAnsiStream Class

| Class | Properties | Methods | Events |

Declaration

TsdAnsiStream = class(TsdCodecStream)

Unit

NativeXml

Description

[ZaphodsMap Index]


TsdAnsiStream Events

| Class | Properties | Methods | Events |

Public

• OnUnicodeLoss

[ZaphodsMap Index]


TsdAnsiStream Methods

| Class | Properties | Methods | Events |

Public

• Create

• Read

• Seek

• Write

[ZaphodsMap Index]


TsdAnsiStream Properties

| Class | Properties | Methods | Events |

Public

• Encoding

• WarningUnicodeLoss

[ZaphodsMap Index]


TsdBufferedStream Class

| Class | Methods |

Declaration

TsdBufferedStream = class(TStream)

Unit

NativeXml

Description

[ZaphodsMap Index]


Create Method of TsdBufferedStream
Create Method

Declaration

Public
constructor Create(AStream: TStream; Owned: Boolean = False);

Applies to

TsdBufferedStream

Description

[ZaphodsMap Index]


Destroy Method of TsdBufferedStream
Destroy Method

Declaration

Public
destructor Destroy; override;

Applies to

TsdBufferedStream

Description

[ZaphodsMap Index]


Read Method of TsdBufferedStream
Read Method

Declaration

Public
function Read(var Buffer: array of Byte; Offset, Count: Longint): Longint; override;

Applies to

TsdBufferedStream

Description

[ZaphodsMap Index]


Write Method of TsdBufferedStream
Write Method

Declaration

Public
function Write(const Buffer: array of Byte; Offset, Count: Longint): Longint; override;

Applies to

TsdBufferedStream

Description

[ZaphodsMap Index]


Seek Method of TsdBufferedStream
Seek Method

Declaration

Public
function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; override;

Applies to

TsdBufferedStream

Description

[ZaphodsMap Index]


TsdBufferedReadStream Class

| Class | Methods |

Declaration

TsdBufferedReadStream = class(TStream)

Unit

NativeXml

Description

[ZaphodsMap Index]


Create Method of TsdBufferedReadStream
Create Method

Declaration

Public
constructor Create(AStream: TStream; Owned: boolean = False);

Applies to

TsdBufferedReadStream

Description

[ZaphodsMap Index]


Destroy Method of TsdBufferedReadStream
Destroy Method

Declaration

Public
destructor Destroy; override;

Applies to

TsdBufferedReadStream

Description

[ZaphodsMap Index]


Read Method of TsdBufferedReadStream
Read Method

Declaration

Public
function Read(var Buffer; Count: Longint): Longint; override;

Applies to

TsdBufferedReadStream

Description

[ZaphodsMap Index]


Write Method of TsdBufferedReadStream
Write Method

Declaration

Public
function Write(const Buffer; Count: Longint): Longint; override;

Applies to

TsdBufferedReadStream

Description

[ZaphodsMap Index]


Seek Method of TsdBufferedReadStream
Seek Method

Declaration

Public
function Seek(Offset: Longint; Origin: Word): Longint; override;

Applies to

TsdBufferedReadStream

Description

[ZaphodsMap Index]


TsdBufferedWriteStream Class

| Class | Methods |

Declaration

TsdBufferedWriteStream = class(TStream)

Unit

NativeXml

Description

[ZaphodsMap Index]


Create Method of TsdBufferedWriteStream
Create Method

Declaration

Public
constructor Create(AStream: TStream; Owned: boolean = False);

Applies to

TsdBufferedWriteStream

Description

[ZaphodsMap Index]


Destroy Method of TsdBufferedWriteStream
Destroy Method

Declaration

Public
destructor Destroy; override;

Applies to

TsdBufferedWriteStream

Description

[ZaphodsMap Index]


Read Method of TsdBufferedWriteStream
Read Method

Declaration

Public
function Read(var Buffer; Count: Longint): Longint; override;

Applies to

TsdBufferedWriteStream

Description

[ZaphodsMap Index]


Write Method of TsdBufferedWriteStream
Write Method

Declaration

Public
function Write(const Buffer; Count: Longint): Longint; override;

Applies to

TsdBufferedWriteStream

Description

[ZaphodsMap Index]


Seek Method of TsdBufferedWriteStream
Seek Method

Declaration

Public
function Seek(Offset: Longint; Origin: Word): Longint; override;

Applies to

TsdBufferedWriteStream

Description

[ZaphodsMap Index]


TsdBufferedStream Methods

| Class | Methods |

Public

• Create

• Destroy

• Read

• Seek

• Write

[ZaphodsMap Index]


TsdBufferedReadStream Methods

| Class | Methods |

Public

• Create

• Destroy

• Read

• Seek

• Write

[ZaphodsMap Index]


TsdBufferedWriteStream Methods

| Class | Methods |

Public

• Create

• Destroy

• Read

• Seek

• Write

[ZaphodsMap Index]


TsdCodecStream Class

| Class | Properties | Methods | Events |

Declaration

TsdCodecStream = class(TStream)

Unit

NativeXml

Description

[ZaphodsMap Index]


Create Method of TsdCodecStream
Create Method

Declaration

Public
constructor Create(AStream: TStream); virtual;

Applies to

TsdCodecStream

Description

[ZaphodsMap Index]


Read Method of TsdCodecStream
Read Method

Declaration

Public
function Read(var Buffer; Count: Longint): Longint; override;

Applies to

TsdCodecStream

Description

[ZaphodsMap Index]


Seek Method of TsdCodecStream
Seek Method

Declaration

Public
function Seek(Offset: Longint; Origin: Word): Longint; override;

Applies to

TsdCodecStream

Description

[ZaphodsMap Index]


Write Method of TsdCodecStream
Write Method

Declaration

Public
function Write(const Buffer; Count: Longint): Longint; override;

Applies to

TsdCodecStream

Description

[ZaphodsMap Index]


Encoding Property of TsdCodecStream
Encoding Property

Declaration

Public
property Encoding: TstringEncodingType read FEncoding write FEncoding;

Applies to

TsdCodecStream

Description

[ZaphodsMap Index]


WarningUnicodeLoss Property of TsdCodecStream
WarningUnicodeLoss Property

Declaration

Public
property WarningUnicodeLoss: boolean read FWarningUnicodeLoss;

Applies to

TsdCodecStream

Description

[ZaphodsMap Index]


OnUnicodeLoss Event of TsdCodecStream
OnUnicodeLoss Event

Declaration

Public
property OnUnicodeLoss: TNotifyEvent read FOnUnicodeLoss write FOnUnicodeLoss;

Applies to

TsdCodecStream

Description

[ZaphodsMap Index]


TsdCodecStream Events

| Class | Properties | Methods | Events |

Public

• OnUnicodeLoss

[ZaphodsMap Index]


TsdCodecStream Methods

| Class | Properties | Methods | Events |

Public

• Create

• Read

• Seek

• Write

[ZaphodsMap Index]


TsdCodecStream Properties

| Class | Properties | Methods | Events |

Public

• Encoding

• WarningUnicodeLoss

[ZaphodsMap Index]


TsdUtf8Stream Class

| Class | Properties | Methods | Events |

Declaration

TsdUtf8Stream = class(TsdCodecStream)

Unit

NativeXml

Description

[ZaphodsMap Index]


TsdUtf8Stream Events

| Class | Properties | Methods | Events |

Public

• OnUnicodeLoss

[ZaphodsMap Index]


TsdUtf8Stream Methods

| Class | Properties | Methods | Events |

Public

• Create

• Read

• Seek

• Write

[ZaphodsMap Index]


TsdUtf8Stream Properties

| Class | Properties | Methods | Events |

Public

• Encoding

• WarningUnicodeLoss

[ZaphodsMap Index]


TXmlNode Class

| Class | Properties | Methods |

Declaration

TXmlNode = class(TPersistent)

Unit

NativeXml

Description

A node in an XML document as used within TNativeXml.

You can search for nodes on a component using a variety of methods including FindNode (which returns a single node) and FindNodes (which returns a list of nodes).

[ZaphodsMap Index]


Create Method of TXmlNode
Create Method

Declaration

Public
constructor Create(ADocument: TNativeXml); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


CreateName Method of TXmlNode
CreateName Method

Declaration

Public
constructor CreateName(ADocument: TNativeXml; const AName: string); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


CreateNameValue Method of TXmlNode
CreateNameValue Method

Declaration

Public
constructor CreateNameValue(ADocument: TNativeXml; const AName, AValue: string); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


CreateType Method of TXmlNode
CreateType Method

Declaration

Public
constructor CreateType(ADocument: TNativeXml; AType: TXmlElementType); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


Assign Method of TXmlNode
Assign Method

Declaration

Public
procedure Assign(Source: TPersistent); override;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


Delete Method of TXmlNode
Delete Method

Declaration

Public
procedure Delete; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


DeleteEmptyNodes Method of TXmlNode
DeleteEmptyNodes Method

Declaration

Public
procedure DeleteEmptyNodes;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


Destroy Method of TXmlNode
Destroy Method

Declaration

Public
destructor Destroy; override;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


AttributeAdd Method of TXmlNode
AttributeAdd Method

Declaration

Public
procedure AttributeAdd(const AName, AValue: string);

Applies to

TXmlNode

Description

[ZaphodsMap Index]


AttributeDelete Method of TXmlNode
AttributeDelete Method

Declaration

Public
procedure AttributeDelete(Index: integer);

Applies to

TXmlNode

Description

[ZaphodsMap Index]


AttributeExchange Method of TXmlNode
AttributeExchange Method

Declaration

Public
procedure AttributeExchange(Index1, Index2: integer);

Applies to

TXmlNode

Description

[ZaphodsMap Index]


AttributeIndexByname Method of TXmlNode
AttributeIndexByname Method

Declaration

Public
function AttributeIndexByname(const AName: string): integer;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


AttributesClear Method of TXmlNode
AttributesClear Method

Declaration

Public
procedure AttributesClear; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


BufferRead Method of TXmlNode
BufferRead Method

Declaration

Public
procedure BufferRead(var Buffer: TBytes; Count: Integer); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


BufferWrite Method of TXmlNode
BufferWrite Method

Declaration

Public
procedure BufferWrite(const Buffer: TBytes; Count: Integer); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


BufferLength Method of TXmlNode
BufferLength Method

Declaration

Public
function BufferLength: integer; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


Clear Method of TXmlNode
Clear Method

Declaration

Public
procedure Clear; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


FindNode Method of TXmlNode
FindNode Method

Declaration

Public
function FindNode(const NodeName: string): TXmlNode;

Applies to

TXmlNode

Description

Find a single node in an XML document.

[ZaphodsMap Index]


FindNodes Method of TXmlNode
FindNodes Method

Declaration

Public
procedure FindNodes(const NodeName: string; const AList: TList);

Applies to

TXmlNode

Description

Find a set of nodes in an XML document.

Be careful: you must allocate memory for the TList before calling the function; otherwise you will create an access violation.

Example Delphi Code

var
  NodeList: TXmlNodeList;
begin
  // assume ADoc is a TNativeXml class, already in memory
  NodeList := nil;
  try
    NodeList := TXmlNodeList.Create;  // allocate memory
    ADoc.FindNodes('Setting', NodeList);   // fill the NodeList
    // use the list in some way
  finally
    FreeAndNil(NodeList);    // free memory
  end;
end;

[ZaphodsMap Index]


FromAnsiString Method of TXmlNode
FromAnsiString Method

Declaration

Public
function FromAnsiString(const s: string): string;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


FromWidestring Method of TXmlNode
FromWidestring Method

Declaration

Public
function FromWidestring(const W: widestring): string;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


HasAttribute Method of TXmlNode
HasAttribute Method

Declaration

Public
function HasAttribute(const AName: string): boolean; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


IndexInParent Method of TXmlNode
IndexInParent Method

Declaration

Public
function IndexInParent: integer;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


IsClear Method of TXmlNode
IsClear Method

Declaration

Public
function IsClear: boolean; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


IsEmpty Method of TXmlNode
IsEmpty Method

Declaration

Public
function IsEmpty: boolean; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


IsEqualTo Method of TXmlNode
IsEqualTo Method

Declaration

Public
 function IsEqualTo(ANode: TXmlNode; Options: TXmlCompareOptions; MismatchNodes: TList = nil): boolean;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeAdd Method of TXmlNode
NodeAdd Method

Declaration

Public
function NodeAdd(ANode: TXmlNode): integer; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeByAttributeValue Method of TXmlNode
NodeByAttributeValue Method

Declaration

Public
 function NodeByAttributeValue(const NodeName, AttribName, AttribValue: string; ShouldRecurse: boolean = True): TXmlNode;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeByElementType Method of TXmlNode
NodeByElementType Method

Declaration

Public
function NodeByElementType(ElementType: TXmlElementType): TXmlNode;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeByName Method of TXmlNode
NodeByName Method

Declaration

Public
function NodeByName(const AName: string): TXmlNode; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeDelete Method of TXmlNode
NodeDelete Method

Declaration

Public
procedure NodeDelete(Index: integer); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeExchange Method of TXmlNode
NodeExchange Method

Declaration

Public
procedure NodeExchange(Index1, Index2: integer);

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeExtract Method of TXmlNode
NodeExtract Method

Declaration

Public
function NodeExtract(ANode: TXmlNode): TXmlNode; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeFindOrCreate Method of TXmlNode
NodeFindOrCreate Method

Declaration

Public
function NodeFindOrCreate(const AName: string): TXmlNode; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeIndexByName Method of TXmlNode
NodeIndexByName Method

Declaration

Public
function NodeIndexByName(const AName: string): integer; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeIndexByNameFrom Method of TXmlNode
NodeIndexByNameFrom Method

Declaration

Public
function NodeIndexByNameFrom(const AName: string; AFrom: integer): integer; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeIndexOf Method of TXmlNode
NodeIndexOf Method

Declaration

Public
function NodeIndexOf(ANode: TXmlNode): integer;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeInsert Method of TXmlNode
NodeInsert Method

Declaration

Public
procedure NodeInsert(Index: integer; ANode: TXmlNode); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeNew Method of TXmlNode
NodeNew Method

Declaration

Public
function NodeNew(const AName: string): TXmlNode; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeNewAtIndex Method of TXmlNode
NodeNewAtIndex Method

Declaration

Public
function NodeNewAtIndex(Index: integer; const AName: string): TXmlNode; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeRemove Method of TXmlNode
NodeRemove Method

Declaration

Public
function NodeRemove(ANode: TxmlNode): integer;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodesClear Method of TXmlNode
NodesClear Method

Declaration

Public
procedure NodesClear; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodesByName Method of TXmlNode
NodesByName Method

Declaration

Public
procedure NodesByName(const AName: string; const AList: TList);

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadAttributeInteger Method of TXmlNode
ReadAttributeInteger Method

Declaration

Public
function ReadAttributeInteger(const AName: string; ADefault: integer = 0): integer; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadAttributeString Method of TXmlNode
ReadAttributeString Method

Declaration

Public
function ReadAttributeString(const AName: string; const ADefault: string = ''): string; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadBool Method of TXmlNode
ReadBool Method

Declaration

Public
function ReadBool(const AName: string; ADefault: boolean = False): boolean; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadBrush Method of TXmlNode
ReadBrush Method

Declaration

Public
procedure ReadBrush(const AName: string; ABrush: TBrush); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadColor Method of TXmlNode
ReadColor Method

Declaration

Public
function ReadColor(const AName: string; ADefault: TColor = clBlack): TColor; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadFont Method of TXmlNode
ReadFont Method

Declaration

Public
procedure ReadFont(const AName: string; AFont: TFont); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadPen Method of TXmlNode
ReadPen Method

Declaration

Public
procedure ReadPen(const AName: string; APen: TPen); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadDateTime Method of TXmlNode
ReadDateTime Method

Declaration

Public
function ReadDateTime(const AName: string; ADefault: TDateTime = 0): TDateTime; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadFloat Method of TXmlNode
ReadFloat Method

Declaration

Public
function ReadFloat(const AName: string; ADefault: double = 0.0): double; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadInt64 Method of TXmlNode
ReadInt64 Method

Declaration

Public
function ReadInt64(const AName: string; ADefault: int64 = 0): int64; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadInteger Method of TXmlNode
ReadInteger Method

Declaration

Public
function ReadInteger(const AName: string; ADefault: integer = 0): integer; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadString Method of TXmlNode
ReadString Method

Declaration

Public
function ReadString(const AName: string; const ADefault: string = ''): string; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ReadWidestring Method of TXmlNode
ReadWidestring Method

Declaration

Public
function ReadWidestring(const AName: string; const ADefault: widestring = ''): widestring; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


SortChildNodes Method of TXmlNode
SortChildNodes Method

Declaration

Public
procedure SortChildNodes(Compare: TXMLNodeCompareFunction = nil; Info: TPointer = nil);

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ToAnsiString Method of TXmlNode
ToAnsiString Method

Declaration

Public
function ToAnsiString(const s: string): string;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ToWidestring Method of TXmlNode
ToWidestring Method

Declaration

Public
function ToWidestring(const s: string): widestring;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsBoolDef Method of TXmlNode
ValueAsBoolDef Method

Declaration

Public
function ValueAsBoolDef(ADefault: boolean): boolean; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsDateTimeDef Method of TXmlNode
ValueAsDateTimeDef Method

Declaration

Public
function ValueAsDateTimeDef(ADefault: TDateTime): TDateTime; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsFloatDef Method of TXmlNode
ValueAsFloatDef Method

Declaration

Public
function ValueAsFloatDef(ADefault: double): double; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsInt64Def Method of TXmlNode
ValueAsInt64Def Method

Declaration

Public
function ValueAsInt64Def(ADefault: int64): int64; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsIntegerDef Method of TXmlNode
ValueAsIntegerDef Method

Declaration

Public
function ValueAsIntegerDef(ADefault: integer): integer; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteAttributeInteger Method of TXmlNode
WriteAttributeInteger Method

Declaration

Public
 procedure WriteAttributeInteger(const AName: string; AValue: integer; ADefault: integer = 0); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteAttributeString Method of TXmlNode
WriteAttributeString Method

Declaration

Public
 procedure WriteAttributeString(const AName: string; const AValue: string; const ADefault: string = ''); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteBool Method of TXmlNode
WriteBool Method

Declaration

Public
procedure WriteBool(const AName: string; AValue: boolean; ADefault: boolean = False); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteBrush Method of TXmlNode
WriteBrush Method

Declaration

Public
procedure WriteBrush(const AName: string; ABrush: TBrush); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteColor Method of TXmlNode
WriteColor Method

Declaration

Public
procedure WriteColor(const AName: string; AValue: TColor; ADefault: TColor = clBlack); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteFont Method of TXmlNode
WriteFont Method

Declaration

Public
procedure WriteFont(const AName: string; AFont: TFont); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WritePen Method of TXmlNode
WritePen Method

Declaration

Public
procedure WritePen(const AName: string; APen: TPen); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteDateTime Method of TXmlNode
WriteDateTime Method

Declaration

Public
procedure WriteDateTime(const AName: string; AValue: TDateTime; ADefault: TDateTime = 0); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteFloat Method of TXmlNode
WriteFloat Method

Declaration

Public
procedure WriteFloat(const AName: string; AValue: double; ADefault: double = 0.0); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteHex Method of TXmlNode
WriteHex Method

Declaration

Public
 procedure WriteHex(const AName: string; AValue: integer; Digits: integer; ADefault: integer = 0); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteInt64 Method of TXmlNode
WriteInt64 Method

Declaration

Public
procedure WriteInt64(const AName: string; AValue: int64; ADefault: int64 = 0); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteInteger Method of TXmlNode
WriteInteger Method

Declaration

Public
procedure WriteInteger(const AName: string; AValue: integer; ADefault: integer = 0); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteString Method of TXmlNode
WriteString Method

Declaration

Public
procedure WriteString(const AName, AValue: string; const ADefault: string = ''); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteToString Method of TXmlNode
WriteToString Method

Declaration

Public
function WriteToString: string; virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteWidestring Method of TXmlNode
WriteWidestring Method

Declaration

Public
 procedure WriteWidestring(const AName: string; const AValue: widestring; const ADefault: widestring = ''); virtual;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


AttributeByName Property of TXmlNode
AttributeByName Property

Declaration

Public
 property AttributeByName[const AName: string]: string read GetAttributeByName write SetAttributeByName;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


AttributeCount Property of TXmlNode
AttributeCount Property

Declaration

Public
property AttributeCount: integer read GetAttributeCount;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


AttributeName Property of TXmlNode
AttributeName Property

Declaration

Public
property AttributeName[Index: integer]: string read GetAttributeName write SetAttributeName;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


AttributePair Property of TXmlNode
AttributePair Property

Declaration

Public
property AttributePair[Index: integer]: string read GetAttributePair;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


AttributeValue Property of TXmlNode
AttributeValue Property

Declaration

Public
property AttributeValue[Index: integer]: string read GetAttributeValue write SetAttributeValue;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


BinaryEncoding Property of TXmlNode
BinaryEncoding Property

Declaration

Public
property BinaryEncoding: TBinaryEncodingType read GetBinaryEncoding write SetBinaryEncoding;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


BinaryString Property of TXmlNode
BinaryString Property

Declaration

Public
property BinaryString: string read GetBinaryString write SetBinaryString;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


CascadedName Property of TXmlNode
CascadedName Property

Declaration

Public
property CascadedName: string read GetCascadedName;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


Document Property of TXmlNode
Document Property

Declaration

Public
property Document: TNativeXml read FDocument write FDocument;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ElementType Property of TXmlNode
ElementType Property

Declaration

Public
property ElementType: TXmlElementType read FElementType write FElementType;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


FullPath Property of TXmlNode
FullPath Property

Declaration

Public
property FullPath: string read GetFullPath;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


Name Property of TXmlNode
Name Property

Declaration

Public
property Name: string read FName write SetName;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


Parent Property of TXmlNode
Parent Property

Declaration

Public
property Parent: TXmlNode read FParent write FParent;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


NodeCount Property of TXmlNode
NodeCount Property

Declaration

Public
property NodeCount: integer read GetNodeCount;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


Nodes Property of TXmlNode
Nodes Property

Declaration

Public
property Nodes[Index: integer]: TXmlNode read GetNodes;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


Tag Property of TXmlNode
Tag Property

Declaration

Public
property Tag: integer read FTag write FTag;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


TreeDepth Property of TXmlNode
TreeDepth Property

Declaration

Public
property TreeDepth: integer read GetTreeDepth;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsBool Property of TXmlNode
ValueAsBool Property

Declaration

Public
property ValueAsBool: boolean read GetValueAsBool write SetValueAsBool;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsDateTime Property of TXmlNode
ValueAsDateTime Property

Declaration

Public
property ValueAsDateTime: TDateTime read GetValueAsDateTime write SetValueAsDateTime;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsInt64 Property of TXmlNode
ValueAsInt64 Property

Declaration

Public
property ValueAsInt64: int64 read GetValueAsInt64 write SetValueAsInt64;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsInteger Property of TXmlNode
ValueAsInteger Property

Declaration

Public
property ValueAsInteger: integer read GetValueAsInteger write SetValueAsInteger;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsFloat Property of TXmlNode
ValueAsFloat Property

Declaration

Public
property ValueAsFloat: double read GetValueAsFloat write SetValueAsFloat;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsString Property of TXmlNode
ValueAsString Property

Declaration

Public
property ValueAsString: string read GetValueAsString write SetValueAsString;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueAsWidestring Property of TXmlNode
ValueAsWidestring Property

Declaration

Public
property ValueAsWidestring: widestring read GetValueAsWidestring write SetValueAsWidestring;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


ValueDirect Property of TXmlNode
ValueDirect Property

Declaration

Public
property ValueDirect: string read FValue write FValue;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


WriteOnDefault Property of TXmlNode
WriteOnDefault Property

Declaration

Public
property WriteOnDefault: boolean read GetWriteOnDefault;

Applies to

TXmlNode

Description

[ZaphodsMap Index]


TXmlNodeList Class

| Class | Properties |

Declaration

TXmlNodeList = class(TList)

Unit

NativeXml

Description

[ZaphodsMap Index]


Items Property of TXmlNodeList
Items Property

Declaration

Public
property Items[Index: Integer]: TXmlNode read GetItems write SetItems;

Applies to

TXmlNodeList

Description

[ZaphodsMap Index]


TXmlNode Methods

| Class | Properties | Methods |

Public

• Assign

• AttributeAdd

• AttributeDelete

• AttributeExchange

• AttributeIndexByname

• AttributesClear

• BufferLength

• BufferRead

• BufferWrite

• Clear

• Create

• CreateName

• CreateNameValue

• CreateType

• Delete

• DeleteEmptyNodes

• Destroy

• FindNode  Find a single node in an XML document.

• FindNodes  ... Find a set of nodes in an XML document.

• FromAnsiString

• FromWidestring

• HasAttribute

• IndexInParent

• IsClear

• IsEmpty

• IsEqualTo

• NodeAdd

• NodeByAttributeValue

• NodeByElementType

• NodeByName

• NodeDelete

• NodeExchange

• NodeExtract

• NodeFindOrCreate

• NodeIndexByName

• NodeIndexByNameFrom

• NodeIndexOf

• NodeInsert

• NodeNew

• NodeNewAtIndex

• NodeRemove

• NodesByName

• NodesClear

• ReadAttributeInteger

• ReadAttributeString

• ReadBool

• ReadBrush

• ReadColor

• ReadDateTime

• ReadFloat

• ReadFont

• ReadInt64

• ReadInteger

• ReadPen

• ReadString

• ReadWidestring

• SortChildNodes

• ToAnsiString

• ToWidestring

• ValueAsBoolDef

• ValueAsDateTimeDef

• ValueAsFloatDef

• ValueAsInt64Def

• ValueAsIntegerDef

• WriteAttributeInteger

• WriteAttributeString

• WriteBool

• WriteBrush

• WriteColor

• WriteDateTime

• WriteFloat

• WriteFont

• WriteHex

• WriteInt64

• WriteInteger

• WritePen

• WriteString

• WriteToString

• WriteWidestring

[ZaphodsMap Index]


TXmlNode Properties

| Class | Properties | Methods |

Public

• AttributeByName

• AttributeCount

• AttributeName

• AttributePair

• AttributeValue

• BinaryEncoding

• BinaryString

• CascadedName

• Document

• ElementType

• FullPath

• Name

• NodeCount

• Nodes

• Parent

• Tag

• TreeDepth

• ValueAsBool

• ValueAsDateTime

• ValueAsFloat

• ValueAsInt64

• ValueAsInteger

• ValueAsString

• ValueAsWidestring

• ValueDirect

• WriteOnDefault

[ZaphodsMap Index]


TXmlNodeList Properties

| Class | Properties |

Public

• Items

[ZaphodsMap Index]


TZaphodKey Class

| Class | Properties | Methods |

Declaration

TZaphodKey = class(TComponent)

Unit

ZaphodsMap

Description

Based on ZMKeybox.xml, a key can point to a file, folder or string value.

See also: ZaphodKeyedFileName for retrieving a Key2File, ZaphodKeyedFolder  for retrieving a Key2Folder, ZaphodKeyedValue for retrieving a Key2Value, and ZaphodKeyedFileZNodeAttr for retrieving an attribute from an xpath in a keyed file.

[ZaphodsMap Index]


CreateKey Method of TZaphodKey
CreateKey Method

Declaration

Public
 constructor CreateKey(AOwner: TComponent; const AKeyIndex: Integer; const AKeyedFileName, ARequiredRootNodeName: string; const AKeyedDetail: TKeyedDetail);

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


Destroy Method of TZaphodKey
Destroy Method

Declaration

Public
destructor Destroy; override;

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


CreateKeyedFileFromString Method of TZaphodKey
CreateKeyedFileFromString Method

Declaration

Public
function CreateKeyedFileFromString(const AFileContents: string; out ErrorMessage: string): Boolean;

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


KeyedFileExists Property of TZaphodKey
KeyedFileExists Property

Declaration

Public
property KeyedFileExists: Boolean read GetKeyedFileExists;

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


KeyedFileLastError Property of TZaphodKey
KeyedFileLastError Property

Declaration

Public
property KeyedFileLastError: string read GetKeyedFileLastError;

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


KeyedFileName Property of TZaphodKey
KeyedFileName Property

Declaration

Public
property KeyedFileName: string read FKeyedFileName;

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


KeyedFilePath Property of TZaphodKey
KeyedFilePath Property

Declaration

Public
property KeyedFilePath: string read FKeyedFilePath;

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


KeyedFilePathParentDir Property of TZaphodKey
KeyedFilePathParentDir Property

Declaration

Public
property KeyedFilePathParentDir: string read FKeyedFilePathParentDir;

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


KeyedFileRootNodeName Property of TZaphodKey
KeyedFileRootNodeName Property

Declaration

Public
property KeyedFileRootNodeName: string read FKeyedFileRootNodeName;

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


KeyedDetail Property of TZaphodKey
KeyedDetail Property

Declaration

Public
property KeyedDetail: TKeyedDetail read FKeyedDetail;

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


KeyIndex Property of TZaphodKey
KeyIndex Property

Declaration

Public
property KeyIndex: Integer read FKeyIndex;

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


KeyedFile Property of TZaphodKey
KeyedFile Property

Declaration

Public
property KeyedFile: TZaphodXmlDoc read FKeyedFile write FKeyedFile;

Applies to

TZaphodKey

Description

[ZaphodsMap Index]


TZaphodKey Methods

| Class | Properties | Methods |

Public

• CreateKey

• CreateKeyedFileFromString

• Destroy

[ZaphodsMap Index]


TZaphodKey Properties

| Class | Properties | Methods |

Public

• KeyedDetail

• KeyedFile

• KeyedFileExists

• KeyedFileLastError

• KeyedFileName

• KeyedFilePath

• KeyedFilePathParentDir

• KeyedFileRootNodeName

• KeyIndex

[ZaphodsMap Index]


DefaultMapContext Property of TZaphodsMap
DefaultMapContext Property

Declaration

Published
property DefaultMapContext: string read FDefaultMapContext;

Applies to

TZaphodsMap

Description

Machine identifier

DefaultMapContext is a word you can use to name your machine/setup, allowing you to have different configuration values for different machines such as your laptop vs your office computer.

Context is an optional attribute within WebHub configuration (XML) files, and basically lets you maintain a single XML file with settings for multiple situations.

This idea originated to support simple directory mapping relating to AppRoot , where on a laptop the directory URL might need to be /href/ but on the real www.href.com machine it would be just /. Rather than change the value of AppRoot each time a project moved from laptop to deployment server, etc., it seemed preferable to have a setting that lived on the machine, permanently.

Other uses for the idea were found over time.

DefaultMapContext does not have to be unique across all machines, and should be a simple (alphanumeric) word.

Unless an administrator sets the DefaultMapContext, it will be blank. Use the ZMAdmin utility to view/set DefaultMapContext, or edit the ZMGlobal.xml file in the folder pointed to by the ZaphodsMap environment variable.

Example ZMGlobal.xml

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="http://www.ZaphodsMap.com/zmdesign/css/ZaphodsMap.xsl"?>
<ZMGlobalSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ZaphodsMap.com/zmdesign/xsd/ZMGlobalSettings200605.xsd">
  <DefaultContext value="ultraann"/>
</ZMGlobalSettings>

Example Use in WebHub-HTML

<whdroplet name="drTesting">
(~SET|x=(~CentralInfo.ZaphodsMap.DefaultMapContext~)~)
The Default Zaphods Map Context on (~Request.Hostname~) is: (~x~)
%=SET|x=somethingelse=%
</whdroplet>

Example Use in Object Pascal

uses
  webApp;

ShowMessage('Context is ' + pWebApp.CentralInfo.ZaphodsMap.DefaultMapContext);

[ZaphodsMap Index]


TZaphodsMap Class

| Class | Properties | Methods | Events |

Declaration

TZaphodsMap = class(TComponent)

Unit

ZaphodsMap

Description

Component which implements the ZaphodsMap configuration system.

Design Overview

The ZaphodsMap configuration system is designed to be

•  cross-platform: Windows (win32 and Dot Net), Linux, etc.

•  cross-language: Object Pascal, C#, C++, etc.

•  dependent only upon a single environment variable

•  flexible enough for real-world applications

•  easy enough for most programmers to learn

Licensing

The web site for this system is http://www.ZaphodsMap.com and all source code and documentation is published under a Creative Commons license. You may use TZaphodsMap in any type of Delphi project as long as you include a mention of the web site in your source code and documentation. Details are on www.ZaphodsMap.com.

Requirements

In order to use ZaphodsMap, you must have an environment variable named ZaphodsMap  pointing to a folder on your computer, e.g. c:\Data\ZaphodsMap\ . Use a folder which you know will be backed up.

Use a Branch for each Software Project

In terms of the Object Pascal components, the TZaphodsMap component loads data from files starting at the map's folder.

Under the map's folder are so-called branches (sub-directories). You should use a unique name for your branch -- perhaps your company name or project name. You can have as many sub-branches as you need, and you can include a configuration version in you r branch as well.

Example Branches

c:\Data\ZaphodsMap\ACompany\AProduct\AVersion\
c:\Data\ZaphodsMap\HREFTools\WebHub\cv004\.

Usage

When you create a TZapohdsMap component in Delphi, you can either Create it in general, or Create it specific to a branch. It is better to create it specific to a branch, using CreateForBranch.

var
  ZM: TZaphodsMap;

begin
  ZM := nil;
  try
    ZM := TZaphodsMap.CreateForBranch('ACompany' + PathDelim + 'AProduct');
    // use the map
  finally
    FreeAndNil(ZM);
  end;

Once you have the component created, you can use the map to find keyboxes (ZMKeybox.xml) which contain keys. A key can point to a folder, a file, or a string value. If you are writing a simple application which requires only a small amount of customiza tion, you can put all your configuration settings directly into the ZMKeybox. Alternatively, you can set up one more level of pointers, and make a Key2File point to an XML file containing your configuration values.

Creating and maintaining the XML files can be done with any ascii file editor, or with the ZMAdmin utility (available as a binary for Windows from www.ZaphodsMap.com).

In memory, the keys are represented by TZaphodKey . If the key is a Key2File, then that pointed-to file is represented by TZaphodXmlDoc.

Once you have the TZaphodXmlDoc loaded, you have extraordinary powers for retrieving values from your custom XML configuration file. In particular:

•  you can use simple xpath syntax to identify the node you want to retrieve instead of climbing through the tree yourself;

•  you can take advantage of the context  feature, which is designed for applications whose configuration might change based on deployment computer, for example, a web application;

•  you can retrieve settings based on the current user;

Shortcuts

If you like the idea of ZaphodsMap but do not want to get involved with the intricacies of the classes, just use the static methods available for retrieving configuration settings: ZaphodKeyedFileZNodeAttr, ZaphodKeyedValue, ZaphodKeyedFolder, and ZaphodKeyedFileName.

[ZaphodsMap Index]


Create Method of TZaphodsMap
Create Method

Declaration

Public
constructor Create(AOwner: TComponent); override;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


CreateForBranch Method of TZaphodsMap
CreateForBranch Method

Declaration

Public
class function CreateForBranch(AOwner: TComponent; const AZaphodBranch: string): TZaphodsMap;

Applies to

TZaphodsMap

Description

Creates a TZaphodsMap instance for a specific branch (folder).

In ZaphodsMap terminology, a branch is a folder (directory) beneath the folder pointed to by the ZaphodsMap environment variable.

Naming Convention for Branches

You will want your branch name to be unique, world-wide, across all companies and software projects. Therefore it is good to choose a particularly unique branch name, perhaps combining your organization name, your project name, and a configuration version number.

Example structure of folders on disk

c:\data\ZaphodsMap                             folder pointed to by ZaphodsMap env var
c:\data\ZaphodsMap\ACompany        branch for organization
c:\data\ZaphodsMap\ACompany\AProduct       sub-branch for product
c:\data\ZaphodsMap\ACompany\AProduct\AConfigVersion        sub-branch for config version

In this example, the branch would be 'ACompany\AProduct\AConfigVersion'.

Syntax using Delphi

ZM := TZaphodsMap.CreateForBranch(Form1, 'HREFTools' + PathDelim + 'WebHub' + PathDelim + 'cv004');

[ZaphodsMap Index]


CreateForService Method of TZaphodsMap
CreateForService Method

Declaration

Public
 class function CreateForService(AOwner: TComponent; const AZaphodBranch: string = ''; const ALocalKeyboxPrefix: string = ''): TZaphodsMap;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


Destroy Method of TZaphodsMap
Destroy Method

Declaration

Public
destructor Destroy; override;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ActivateKey Method of TZaphodsMap
ActivateKey Method

Declaration

Public
 function ActivateKey(const KeyGroupName, KeyName: string; const ContextUsage: TContextUsage; const UserNameUsage: TUserNameUsage; const RequiredRootNodeName: string; const DefaultKeyedFileName: string = ''): TZaphodKey;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ActivateKeyDoc Method of TZaphodsMap
ActivateKeyDoc Method

Declaration

Public
 function ActivateKeyDoc(const KeyGroupName, KeyName: string; const ContextUsage: TContextUsage; const UserNameUsage: TUserNameUsage; const RequiredRootNodeName: string; const DefaultKeyedFileName: string = ''): TZaphodXmlDoc;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ActivateTempKey Method of TZaphodsMap
ActivateTempKey Method

Declaration

Public
function ActivateTempKey(const KeyedFileName, RequiredRootNodeName: string): TZaphodKey;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ActivateTempKeyDoc Method of TZaphodsMap
ActivateTempKeyDoc Method

Declaration

Public
function ActivateTempKeyDoc(const KeyedFileName, RequiredRootNodeName: string): TZaphodXmlDoc;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


KeyedFileName Method of TZaphodsMap
KeyedFileName Method

Declaration

Public
 function KeyedFileName(const KeyGroupName: string; const KeyName: string; const ContextUsage: TContextUsage; const UserNameUsage: TUserNameUsage; const DefaultFileName: string): string;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


KeyedFolder Method of TZaphodsMap
KeyedFolder Method

Declaration

Public
 function KeyedFolder(const KeyGroupName: string; const KeyName: string; const ContextUsage: TContextUsage; const UserNameUsage: TUserNameUsage; const DefaultFolderName: string): string;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


KeyedValue Method of TZaphodsMap
KeyedValue Method

Declaration

Public
 function KeyedValue(const KeyGroupName: string; const KeyName: string; const ContextUsage: TContextUsage; const UserNameUsage: TUserNameUsage; const DefaultValue: string): string;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


DeactivateAllKeys Method of TZaphodsMap
DeactivateAllKeys Method

Declaration

Public
procedure DeactivateAllKeys;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


DeactivateKey Method of TZaphodsMap
DeactivateKey Method

Declaration

Public
procedure DeactivateKey(const Index: Integer);

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


Reset Method of TZaphodsMap
Reset Method

Declaration

Public
procedure Reset;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


SetLocalKeyboxLocation Method of TZaphodsMap
SetLocalKeyboxLocation Method

Declaration

Public
 procedure SetLocalKeyboxLocation( const ALocalKeyboxLocation: TLocalKeyboxLocation; const ACustomPath: string = '');

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


LastKeyedDetail Property of TZaphodsMap
LastKeyedDetail Property

Declaration

Public
property LastKeyedDetail: TKeyedDetail read FLastKeyedDetail;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ZaphodKeys Property of TZaphodsMap
ZaphodKeys Property

Declaration

Public
property ZaphodKeys[Index: Integer]: TZaphodKey read GetZaphodKey;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ProjectOptions Property of TZaphodsMap
ProjectOptions Property

Declaration

Public
property ProjectOptions: IZaphodProjectOptions read FProjectOptions write SetProjectOptions;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


BranchKeybox Property of TZaphodsMap
BranchKeybox Property

Declaration

Published
property BranchKeybox: string read FBranchKeybox ;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


BranchKeyboxExists Property of TZaphodsMap
BranchKeyboxExists Property

Declaration

Published
property BranchKeyboxExists: Boolean read FBranchKeyboxExists;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


BranchKeyboxXmlOK Property of TZaphodsMap
BranchKeyboxXmlOK Property

Declaration

Published
property BranchKeyboxXmlOK: Boolean read FBranchKeyboxXmlOK;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


BranchKeyboxWarnings Property of TZaphodsMap
BranchKeyboxWarnings Property

Declaration

Published
property BranchKeyboxWarnings: string read GetBranchKeyboxWarnings;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


DefaultUserName Property of TZaphodsMap
DefaultUserName Property

Declaration

Published
property DefaultUserName: string read FDefaultUserName;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ErrorDetailAllowed Property of TZaphodsMap
ErrorDetailAllowed Property

Declaration

Published
property ErrorDetailAllowed: TErrorDetailAllowedSet  read FErrorDetailAllowed write FErrorDetailAllowed;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ExecutableNameNoExt Property of TZaphodsMap
ExecutableNameNoExt Property

Declaration

Published
property ExecutableNameNoExt: string read FExecutableNameNoExt;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ExecutablePath Property of TZaphodsMap
ExecutablePath Property

Declaration

Published
property ExecutablePath: string read FExecutablePath;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


KeyLastError Property of TZaphodsMap
KeyLastError Property

Declaration

Published
property KeyLastError: string read FKeyLastError;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


LibraryNameNoExt Property of TZaphodsMap
LibraryNameNoExt Property

Declaration

Published
property LibraryNameNoExt: string read FLibraryNameNoExt;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


LibraryPath Property of TZaphodsMap
LibraryPath Property

Declaration

Published
property LibraryPath: string read FLibraryPath;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


LocalKeybox Property of TZaphodsMap
LocalKeybox Property

Declaration

Published
property LocalKeybox: string read GetLocalKeybox;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


LocalKeyboxExists Property of TZaphodsMap
LocalKeyboxExists Property

Declaration

Published
property LocalKeyboxExists: Boolean read GetLocalKeyboxExists;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


LocalKeyboxLocation Property of TZaphodsMap
LocalKeyboxLocation Property

Declaration

Published
property LocalKeyboxLocation: TLocalKeyboxLocation read FLocalKeyboxLocation;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


LocalKeyboxPath Property of TZaphodsMap
LocalKeyboxPath Property

Declaration

Published
property LocalKeyboxPath: string read GetLocalKeyboxPath;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


LocalKeyboxPrefix Property of TZaphodsMap
LocalKeyboxPrefix Property

Declaration

Published
property LocalKeyboxPrefix: string read FLocalKeyboxPrefix write SetLocalKeyboxPrefix;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


LocalKeyboxPrefixEnabled Property of TZaphodsMap
LocalKeyboxPrefixEnabled Property

Declaration

Published
 property LocalKeyboxPrefixEnabled: Boolean read FLocalKeyboxPrefixEnabled write SetLocalKeyboxPrefixEnabled;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


LocalKeyboxWarnings Property of TZaphodsMap
LocalKeyboxWarnings Property

Declaration

Published
property LocalKeyboxWarnings: string read GetLocalKeyboxWarnings;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


LocalKeyboxXmlOK Property of TZaphodsMap
LocalKeyboxXmlOK Property

Declaration

Published
property LocalKeyboxXmlOK: Boolean read GetLocalKeyboxXmlOK;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


PropertyList Property of TZaphodsMap
PropertyList Property

Declaration

Published
property PropertyList: TStrings read GetPropertyList write SetPropertyList stored False;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ZaphodBranch Property of TZaphodsMap
ZaphodBranch Property

Declaration

Published
property ZaphodBranch: string read FZaphodBranch write SetZaphodBranch;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ZaphodKeyCount Property of TZaphodsMap
ZaphodKeyCount Property

Declaration

Published
property ZaphodKeyCount: Integer read GetZaphodKeyCount;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ZaphodsMapEnvVarExists Property of TZaphodsMap
ZaphodsMapEnvVarExists Property

Declaration

Published
property ZaphodsMapEnvVarExists: Boolean read FZaphodsMapEnvVarExists;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


ZaphodsMapRootFolder Property of TZaphodsMap
ZaphodsMapRootFolder Property

Declaration

Published
property ZaphodsMapRootFolder: string read FZaphodsMapRoot;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


OnDestroy Event of TZaphodsMap
OnDestroy Event

Declaration

Published
property OnDestroy: TNotifyEvent read FOnDestroy write FOnDestroy;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


OnKeyedFileReloaded Event of TZaphodsMap
OnKeyedFileReloaded Event

Declaration

Published
 property OnKeyedFileReloaded: TKeyedFileChangedEvent read FOnKeyedFileReloaded write FOnKeyedFileReloaded;

Applies to

TZaphodsMap

Description

[ZaphodsMap Index]


TZaphodsMapAdmin Class

| Class | Properties | Methods | Events |

Declaration

TZaphodsMapAdmin = class(TZaphodsMap)

Unit

ZaphodsMap

Description

Used within the ZMAdmin utility to facilitate administration of config files.

[ZaphodsMap Index]


CreateForBranch Method of TZaphodsMapAdmin
CreateForBranch Method

Declaration

Public
class function CreateForBranch(AOwner: TComponent; const AZaphodBranch: string): TZaphodsMapAdmin;

Applies to

TZaphodsMapAdmin

Description

[ZaphodsMap Index]


ActivateKeyEx Method of TZaphodsMapAdmin
ActivateKeyEx Method

Declaration

Public
 function ActivateKeyEx(const KeyGroupName, KeyName: string; const ContextUsage: TContextUsage; const Context: string; const UserNameUsage: TUserNameUsage; const UserName: string; const RequiredRootNodeName: string; const DefaultKeyedFileName: string = ''): TZaphodKey;

Applies to

TZaphodsMapAdmin

Description

[ZaphodsMap Index]


ActivateKeyDocEx Method of TZaphodsMapAdmin
ActivateKeyDocEx Method

Declaration

Public
 function ActivateKeyDocEx(const KeyGroupName, KeyName: string; const ContextUsage: TContextUsage; const Context: string; const UserNameUsage: TUserNameUsage; const UserName: string; const RequiredRootNodeName: string; const DefaultKeyedFileName: string = ''): TZaphodXmlDoc;

Applies to

TZaphodsMapAdmin

Description

[ZaphodsMap Index]


ActivateTempKeyEx Method of TZaphodsMapAdmin
ActivateTempKeyEx Method

Declaration

Public
 function ActivateTempKeyEx(const KeyedFileName, RequiredRootNodeName: string; const ContextUsage: TContextUsage; const Context: string; const UserNameUsage: TUserNameUsage; const UserName: string): TZaphodKey;

Applies to

TZaphodsMapAdmin

Description

[ZaphodsMap Index]


ActivateTempKeyDocEx Method of TZaphodsMapAdmin
ActivateTempKeyDocEx Method

Declaration

Public
 function ActivateTempKeyDocEx(const KeyedFileName, RequiredRootNodeName: string; const ContextUsage: TContextUsage; const Context: string; const UserNameUsage: TUserNameUsage; const UserName: string): TZaphodXmlDoc;

Applies to

TZaphodsMapAdmin

Description

[ZaphodsMap Index]


KeyedFileNameEx Method of TZaphodsMapAdmin
KeyedFileNameEx Method

Declaration

Public
 function KeyedFileNameEx(const KeyGroupName: string; const KeyName: string; const ContextUsage: TContextUsage; const ContextValue: string; const UserNameUsage: TUserNameUsage; const UserNameValue: string; const DefaultFileName: string): string;

Applies to

TZaphodsMapAdmin

Description

[ZaphodsMap Index]


KeyedFolderEx Method of TZaphodsMapAdmin
KeyedFolderEx Method

Declaration

Public
 function KeyedFolderEx(const KeyGroupName: string; const KeyName: string; const ContextUsage: TContextUsage; const ContextValue: string; const UserNameUsage: TUserNameUsage; const UserNameValue: string; const DefaultFolder: string): string;

Applies to

TZaphodsMapAdmin

Description

[ZaphodsMap Index]


KeyedValueEx Method of TZaphodsMapAdmin
KeyedValueEx Method

Declaration

Public
 function KeyedValueEx(const KeyGroupName: string; const KeyName: string; const ContextUsage: TContextUsage; const ContextValue: string; const UserNameUsage: TUserNameUsage; const UserNameValue: string; const DefaultValue: string): string;

Applies to

TZaphodsMapAdmin

Description

[ZaphodsMap Index]


TZaphodsMapSetup Class

| Class | Properties | Methods |

Declaration

TZaphodsMapSetup = class(TComponent)

Unit

ZaphodsMapSetup

Description

Used within software installation programs to initialize aspects of ZM.

The TZaphodsMapSetup component is meant for use in installation ("setup") programs, for handling tasks that normally only need to be done once on a system. Normal use of the ZaphodsMap system usually does not require this component at all.

[ZaphodsMap Index]


Create Method of TZaphodsMapSetup
Create Method

Declaration

Public
constructor Create(AOwner: TComponent); override;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


CreateForBranch Method of TZaphodsMapSetup
CreateForBranch Method

Declaration

Public
class function CreateForBranch(AOwner: TComponent; const AZaphodBranch: string): TZaphodsMapSetup;

Applies to

TZaphodsMapSetup

Description

Creates a TZaphodsMapSetup instance for a specific branch (folder).

This is exactly the same as TZaphodsMap.CreateForBranch , except that it instantiates a TZaphdsMapSetup component, so you have a richer feature set available.

[ZaphodsMap Index]


CreateForService Method of TZaphodsMapSetup
CreateForService Method

Declaration

Public
 class function CreateForService( AOwner: TComponent; const AZaphodBranch: string = ''; const ALocalKeyboxPrefix: string = ''): TZaphodsMapSetup;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


Destroy Method of TZaphodsMapSetup
Destroy Method

Declaration

Public
destructor Destroy; override;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


CreateZMBranch Method of TZaphodsMapSetup
CreateZMBranch Method

Declaration

Public
function CreateZMBranch(ZaphodBranch: string): Boolean;

Applies to

TZaphodsMapSetup

Description

Create a branch (folder) under the ZM root folder.

Call this function to create a directory under the path defined by the ZaphodsMap environment variable. The function returns True if the directory exists (either because it was already there or because it was created).

In case of problems, check the LastError property.

Example Delphi Code

var
  ZMS: TZaphodsMapSetup;
begin
  ZMS := nil;

  try
    ZMS := TZaphodsMapSetup.Create(Form1);
    if NOT ZMS.CreateZMBranch('ACompany' + PathDelim + 'ThisProject') then
      ShowMessage(ZMS.LastError);
  finally
    FreeAndNil(ZMS);
  end;

[ZaphodsMap Index]


CreateZMContextFile Method of TZaphodsMapSetup
CreateZMContextFile Method

Declaration

Public
 function CreateZMContextFile(const Location: TContextLocation; const DefaultContext: string = ''): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


CreateZMGlobalFile Method of TZaphodsMapSetup
CreateZMGlobalFile Method

Declaration

Public
function CreateZMGlobalFile(const DefaultContext: string = ''): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


CreateZMKeybox Method of TZaphodsMapSetup
CreateZMKeybox Method

Declaration

Public
function CreateZMKeybox(const KeyboxLocation: TKeyboxLocation): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


DeleteZMBranch Method of TZaphodsMapSetup
DeleteZMBranch Method

Declaration

Public
function DeleteZMBranch(ZaphodBranch: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


DeleteZMContextFile Method of TZaphodsMapSetup
DeleteZMContextFile Method

Declaration

Public
function DeleteZMContextFile( const Location: TContextLocation): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


DeleteZMGlobalFile Method of TZaphodsMapSetup
DeleteZMGlobalFile Method

Declaration

Public
function DeleteZMGlobalFile: Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


DeleteZMKeybox Method of TZaphodsMapSetup
DeleteZMKeybox Method

Declaration

Public
function DeleteZMKeybox( const KeyboxLocation: TKeyboxLocation): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


DeleteZMSubBranch Method of TZaphodsMapSetup
DeleteZMSubBranch Method

Declaration

Public
function DeleteZMSubBranch(ZaphodBranch: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


SaveKey Method of TZaphodsMapSetup
SaveKey Method

Declaration

Public
 function SaveKey( const KeyboxLocation: TKeyboxLocation; const KeyGroupName: string; const KeyType: TZaphodKeyType; const KeyName: string; const KeyValue: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


SaveKeyEx Method of TZaphodsMapSetup
SaveKeyEx Method

Declaration

Public
 function SaveKeyEx(const KeyboxLocation: TKeyboxLocation; const KeyGroupName: string; const KeyType: TZaphodKeyType; const KeyName, Context, UserName: string; const KeyValue: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


DeleteKey Method of TZaphodsMapSetup
DeleteKey Method

Declaration

Public
 function DeleteKey( const KeyboxLocation: TKeyboxLocation; const KeyGroupName: string; const KeyType: TZaphodKeyType; const KeyName: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


DeleteKeyEx Method of TZaphodsMapSetup
DeleteKeyEx Method

Declaration

Public
 function DeleteKeyEx( const KeyboxLocation: TKeyboxLocation; const KeyGroupName: string; const KeyType: TZaphodKeyType; const KeyName: string; const Context: string = ''; const UserName: string = ''): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


SaveKeyboxVarDelimiters Method of TZaphodsMapSetup
SaveKeyboxVarDelimiters Method

Declaration

Public
 function SaveKeyboxVarDelimiters( const KeyboxLocation: TKeyboxLocation; const BeginDelimiter: string = '{'; const EndDelimiter: string = '}'): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


SaveKeyboxVar Method of TZaphodsMapSetup
SaveKeyboxVar Method

Declaration

Public
 function SaveKeyboxVar( const KeyboxLocation: TKeyboxLocation; const VarName, Value: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


SaveKeyGroupVar Method of TZaphodsMapSetup
SaveKeyGroupVar Method

Declaration

Public
 function SaveKeyGroupVar( const KeyboxLocation: TKeyboxLocation; const KeyGroupName, VarName, Value: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


DeleteKeyboxVar Method of TZaphodsMapSetup
DeleteKeyboxVar Method

Declaration

Public
function DeleteKeyboxVar( const KeyboxLocation: TKeyboxLocation; const VarName: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


SaveKeyGroup Method of TZaphodsMapSetup
SaveKeyGroup Method

Declaration

Public
function SaveKeyGroup( const KeyboxLocation: TKeyboxLocation; const KeyGroupName: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


DeleteKeyGroup Method of TZaphodsMapSetup
DeleteKeyGroup Method

Declaration

Public
 function DeleteKeyGroup( const KeyboxLocation: TKeyboxLocation; const KeyGroupName: string; const RequireEmpty: Boolean): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


DeleteKeyGroupVar Method of TZaphodsMapSetup
DeleteKeyGroupVar Method

Declaration

Public
 function DeleteKeyGroupVar( const KeyboxLocation: TKeyboxLocation; const KeyGroupName, VarName: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


GetKeyboxVarByName Method of TZaphodsMapSetup
GetKeyboxVarByName Method

Declaration

Public
 function GetKeyboxVarByName( const KeyboxLocation: TKeyboxLocation; const AVarName: string; var AVarValue: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


GetKeyboxVarDelimiters Method of TZaphodsMapSetup
GetKeyboxVarDelimiters Method

Declaration

Public
 function GetKeyboxVarDelimiters( const KeyboxLocation: TKeyboxLocation; var BeginDelimiter, EndDelimiter: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


GetKeyboxGroupVarByName Method of TZaphodsMapSetup
GetKeyboxGroupVarByName Method

Declaration

Public
 function GetKeyboxGroupVarByName( const KeyboxLocation: TKeyboxLocation; const KeyGroupName, AVarName: string; var AVarValue: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


ZaphodsMapEnvVarCreate Method of TZaphodsMapSetup
ZaphodsMapEnvVarCreate Method

Declaration

Public
function ZaphodsMapEnvVarCreate( const ZaphodsMapRootFolder: string): Boolean;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


ZaphodBranch Property of TZaphodsMapSetup
ZaphodBranch Property

Declaration

Public
property ZaphodBranch: string read GetZaphodBranch write SetZaphodBranch;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


BranchKeyboxExists Property of TZaphodsMapSetup
BranchKeyboxExists Property

Declaration

Public
property BranchKeyboxExists: Boolean read GetBranchKeyboxExists;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


BranchKeyboxKeyGroupCount Property of TZaphodsMapSetup
BranchKeyboxKeyGroupCount Property

Declaration

Public
property BranchKeyboxKeyGroupCount: Integer read GetBranchKeyboxKeyGroupCount;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


LocalKeyboxExists Property of TZaphodsMapSetup
LocalKeyboxExists Property

Declaration

Public
property LocalKeyboxExists: Boolean read GetLocalKeyboxExists;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


LocalKeyboxKeyGroupCount Property of TZaphodsMapSetup
LocalKeyboxKeyGroupCount Property

Declaration

Public
property LocalKeyboxKeyGroupCount: Integer read GetLocalKeyboxKeyGroupCount;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


LocalKeyboxPathAndFileName Property of TZaphodsMapSetup
LocalKeyboxPathAndFileName Property

Declaration

Public
property LocalKeyboxPathAndFileName: string read FLocalKeyboxPathAndFileName;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


LocalKeyboxPath Property of TZaphodsMapSetup
LocalKeyboxPath Property

Declaration

Public
property LocalKeyboxPath: string read FLocalKeyboxPath write SetLocalKeyboxPath;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


LocalKeyboxPrefix Property of TZaphodsMapSetup
LocalKeyboxPrefix Property

Declaration

Public
property LocalKeyboxPrefix: string read FLocalKeyboxPrefix write SetLocalKeyboxPrefix;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


LastError Property of TZaphodsMapSetup
LastError Property

Declaration

Public
property LastError: string read FLastError;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


ZaphodBranchCount Property of TZaphodsMapSetup
ZaphodBranchCount Property

Declaration

Public
property ZaphodBranchCount: Integer read GetZaphodBranchCount;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


ZaphodsMapEnvVarExists Property of TZaphodsMapSetup
ZaphodsMapEnvVarExists Property

Declaration

Public
property ZaphodsMapEnvVarExists: Boolean read GetZaphodsMapEnvVarExists;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


ZaphodsMapRootFolder Property of TZaphodsMapSetup
ZaphodsMapRootFolder Property

Declaration

Public
property ZaphodsMapRootFolder: string read GetZaphodsMapRootFolder;

Applies to

TZaphodsMapSetup

Description

[ZaphodsMap Index]


TZaphodsMap Events

| Class | Properties | Methods | Events |

Published

• OnDestroy

• OnKeyedFileReloaded

[ZaphodsMap Index]


TZaphodsMapAdmin Events

| Class | Properties | Methods | Events |

Published

• OnDestroy

• OnKeyedFileReloaded

[ZaphodsMap Index]


TZaphodsMap Methods

| Class | Properties | Methods | Events |

Public

• ActivateKey

• ActivateKeyDoc

• ActivateTempKey

• ActivateTempKeyDoc

• Create

• CreateForBranch  ... Creates a TZaphodsMap instance for a specific branch (folder).

• CreateForService

• DeactivateAllKeys

• DeactivateKey

• Destroy

• KeyedFileName

• KeyedFolder

• KeyedValue

• Reset

• SetLocalKeyboxLocation

[ZaphodsMap Index]


TZaphodsMapAdmin Methods

| Class | Properties | Methods | Events |

Public

• ActivateKey

• ActivateKeyDoc

• ActivateKeyDocEx

• ActivateKeyEx

• ActivateTempKey

• ActivateTempKeyDoc

• ActivateTempKeyDocEx

• ActivateTempKeyEx

• Create

• CreateForBranch  ... Creates a TZaphodsMap instance for a specific branch (folder).

• CreateForService

• DeactivateAllKeys

• DeactivateKey

• Destroy

• KeyedFileName

• KeyedFileNameEx

• KeyedFolder

• KeyedFolderEx

• KeyedValue

• KeyedValueEx

• Reset

• SetLocalKeyboxLocation

[ZaphodsMap Index]


TZaphodsMapSetup Methods

| Class | Properties | Methods |

Public

• Create

• CreateForBranch  ... Creates a TZaphodsMapSetup instance for a specific branch (folder).

• CreateForService

• CreateZMBranch  ... Create a branch (folder) under the ZM root folder.

• CreateZMContextFile

• CreateZMGlobalFile

• CreateZMKeybox

• DeleteKey

• DeleteKeyboxVar

• DeleteKeyEx

• DeleteKeyGroup

• DeleteKeyGroupVar

• DeleteZMBranch

• DeleteZMContextFile

• DeleteZMGlobalFile

• DeleteZMKeybox

• DeleteZMSubBranch

• Destroy

• GetKeyboxGroupVarByName

• GetKeyboxVarByName

• GetKeyboxVarDelimiters

• SaveKey

• SaveKeyboxVar

• SaveKeyboxVarDelimiters

• SaveKeyEx

• SaveKeyGroup

• SaveKeyGroupVar

• ZaphodsMapEnvVarCreate

[ZaphodsMap Index]


TZaphodsMap Properties

| Class | Properties | Methods | Events |

Public

• LastKeyedDetail

• ProjectOptions

• ZaphodKeys

Published

• BranchKeybox

• BranchKeyboxExists

• BranchKeyboxWarnings

• BranchKeyboxXmlOK

• DefaultMapContext  ... Machine identifier

• DefaultUserName

• ErrorDetailAllowed

• ExecutableNameNoExt

• ExecutablePath

• KeyLastError

• LibraryNameNoExt

• LibraryPath

• LocalKeybox

• LocalKeyboxExists

• LocalKeyboxLocation

• LocalKeyboxPath

• LocalKeyboxPrefix

• LocalKeyboxPrefixEnabled

• LocalKeyboxWarnings

• LocalKeyboxXmlOK

• PropertyList

• ZaphodBranch

• ZaphodKeyCount

• ZaphodsMapEnvVarExists

• ZaphodsMapRootFolder

[ZaphodsMap Index]


TZaphodsMapAdmin Properties

| Class | Properties | Methods | Events |

Public

• LastKeyedDetail

• ProjectOptions

• ZaphodKeys

Published

• BranchKeybox

• BranchKeyboxExists

• BranchKeyboxWarnings

• BranchKeyboxXmlOK

• DefaultMapContext  ... Machine identifier

• DefaultUserName

• ErrorDetailAllowed

• ExecutableNameNoExt

• ExecutablePath

• KeyLastError

• LibraryNameNoExt

• LibraryPath

• LocalKeybox

• LocalKeyboxExists

• LocalKeyboxLocation

• LocalKeyboxPath

• LocalKeyboxPrefix

• LocalKeyboxPrefixEnabled

• LocalKeyboxWarnings

• LocalKeyboxXmlOK

• PropertyList

• ZaphodBranch

• ZaphodKeyCount

• ZaphodsMapEnvVarExists

• ZaphodsMapRootFolder

[ZaphodsMap Index]


TZaphodsMapSetup Properties

| Class | Properties | Methods |

Public

• BranchKeyboxExists

• BranchKeyboxKeyGroupCount

• LastError

• LocalKeyboxExists

• LocalKeyboxKeyGroupCount

• LocalKeyboxPath

• LocalKeyboxPathAndFileName

• LocalKeyboxPrefix

• ZaphodBranch

• ZaphodBranchCount

• ZaphodsMapEnvVarExists

• ZaphodsMapRootFolder

[ZaphodsMap Index]


TZaphodXmlDoc Class

| Class | Properties | Methods | Events |

Declaration

TZaphodXmlDoc = class(TNativeXml)

Unit

ZaphodsMap

Description

An XML document (TNativeXml) with extra features for use with ZaphodsMap.

[ZaphodsMap Index]


Create Method of TZaphodXmlDoc
Create Method

Declaration

Public
 constructor Create(const AFileName, ARequiredRootNodeName, AContextDefault: string; const AContextAttributeID: string = 'context');

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


Destroy Method of TZaphodXmlDoc
Destroy Method

Declaration

Public
destructor Destroy; override;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


ClearWarnings Method of TZaphodXmlDoc
ClearWarnings Method

Declaration

Public
procedure ClearWarnings;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


FullXPath Method of TZaphodXmlDoc
FullXPath Method

Declaration

Public
function FullXPath(StartNode: TZaphodNode; const XPath: string = ''):string;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


LoadFile Method of TZaphodXmlDoc
LoadFile Method

Declaration

Public
function LoadFile: Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


SaveFile Method of TZaphodXmlDoc
SaveFile Method

Declaration

Public
function SaveFile: Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


BeginUpdate Method of TZaphodXmlDoc
BeginUpdate Method

Declaration

Public
function BeginUpdate(out FileReloaded: Boolean): Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


CancelUpdate Method of TZaphodXmlDoc
CancelUpdate Method

Declaration

Public
procedure CancelUpdate;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


EndUpdate Method of TZaphodXmlDoc
EndUpdate Method

Declaration

Public
function EndUpdate: Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


SaveVarDelimiters Method of TZaphodXmlDoc
SaveVarDelimiters Method

Declaration

Public
 function SaveVarDelimiters(const BeginDelimiter: string = '{'; const EndDelimiter: string = '}'): Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


SaveVar Method of TZaphodXmlDoc
SaveVar Method

Declaration

Public
function SaveVar(const ParentNode: TZaphodNode; const VarName, Value: string): Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


DeleteVar Method of TZaphodXmlDoc
DeleteVar Method

Declaration

Public
function DeleteVar(const ParentNode: TZaphodNode; const VarName: string): Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


VarDelimitersInUse Method of TZaphodXmlDoc
VarDelimitersInUse Method

Declaration

Public
function VarDelimitersInUse: Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


VarGetDelimiters Method of TZaphodXmlDoc
VarGetDelimiters Method

Declaration

Public
function VarGetDelimiters(out BeginDelim: string; out EndDelim: string): Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


VarIsInUse Method of TZaphodXmlDoc
VarIsInUse Method

Declaration

Public
function VarIsInUse(ParentNode: TZaphodNode; const AVarName: string): Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


VarValue Method of TZaphodXmlDoc
VarValue Method

Declaration

Public
function VarValue(const ANode: TZaphodNode; const AVarName: string): string;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


ZNode Method of TZaphodXmlDoc
ZNode Method

Declaration

Public
 function ZNode(StartNode: TZaphodNode; XPath: array of const; const ContextUsage: TContextUsage = cxNone; const AllowCreate: Boolean = False): TZaphodNode;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


ZNodeAttr Method of TZaphodXmlDoc
ZNodeAttr Method

Declaration

Public
 function ZNodeAttr(StartNode: TZaphodNode; XPath: array of const; const ContextUsage: TContextUsage; const DefaultResult: Variant; const SelectAttributeID: string = 'value'): Variant;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


ZNodeAttrSave Method of TZaphodXmlDoc
ZNodeAttrSave Method

Declaration

Public
 function ZNodeAttrSave(StartNode: TZaphodNode; XPath: array of const; const ContextUsage: TContextUsage; const Value: Variant; const SelectAttributeID: string = 'value'; const AllowCreate: Boolean = True): Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


ZNodeValue Method of TZaphodXmlDoc
ZNodeValue Method

Declaration

Public
 function ZNodeValue(StartNode: TZaphodNode; XPath: array of const; const ContextUsage: TContextUsage; const DefaultResult: Variant): Variant;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


ZNodeValueSave Method of TZaphodXmlDoc
ZNodeValueSave Method

Declaration

Public
 function ZNodeValueSave(StartNode: TZaphodNode; XPath: array of const; const ContextUsage: TContextUsage; const Value: Variant; const AllowCreate: Boolean = True): Boolean;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


LoadFromFile Method of TZaphodXmlDoc
LoadFromFile Method

Declaration

Public
procedure LoadFromFile(const FileName: string); override;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


SaveToFile Method of TZaphodXmlDoc
SaveToFile Method

Declaration

Public
procedure SaveToFile(const FileName: string); override;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


ContextAttributeID Property of TZaphodXmlDoc
ContextAttributeID Property

Declaration

Public
property ContextAttributeID: string read FContextAttributeID;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


ContextDefault Property of TZaphodXmlDoc
ContextDefault Property

Declaration

Public
property ContextDefault: string read FContextDefault;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


ErrorDetailAllowed Property of TZaphodXmlDoc
ErrorDetailAllowed Property

Declaration

Public
property ErrorDetailAllowed: TErrorDetailAllowedSet  read FErrorDetailAllowed write FErrorDetailAllowed;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


KeyIndex Property of TZaphodXmlDoc
KeyIndex Property

Declaration

Public
property KeyIndex: Integer read GetKeyIndex;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


LastError Property of TZaphodXmlDoc
LastError Property

Declaration

Public
property LastError: string read FLastError;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


LastNode Property of TZaphodXmlDoc
LastNode Property

Declaration

Public
property LastNode: TZaphodNode read FLastNode write FLastNode;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


LastNodeAttrFound Property of TZaphodXmlDoc
LastNodeAttrFound Property

Declaration

Public
property LastNodeAttrFound: Boolean read FLastNodeAttrFound;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


LastNodeContextUsage Property of TZaphodXmlDoc
LastNodeContextUsage Property

Declaration

Public
property LastNodeContextUsage: TContextUsage read FLastNodeContextUsage;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


LastNodeContextUsed Property of TZaphodXmlDoc
LastNodeContextUsed Property

Declaration

Public
property LastNodeContextUsed: Boolean read FLastNodeContextUsed;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


LastNodeContextValue Property of TZaphodXmlDoc
LastNodeContextValue Property

Declaration

Public
property LastNodeContextValue: string read FLastNodeContextValue;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


LastNodeSelectAttrID Property of TZaphodXmlDoc
LastNodeSelectAttrID Property

Declaration

Public
property LastNodeSelectAttrID: string read FLastNodeSelectAttrID;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


Warnings Property of TZaphodXmlDoc
Warnings Property

Declaration

Public
property Warnings: TStringList read FWarnings;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


XmlOK Property of TZaphodXmlDoc
XmlOK Property

Declaration

Public
property XmlOK: Boolean read FXmlOK;

Applies to

TZaphodXmlDoc

Description

[ZaphodsMap Index]


TZaphodXmlDocAdmin Class

| Class | Properties | Methods | Events |

Declaration

TZaphodXmlDocAdmin = class(TZaphodXmlDoc)

Unit

ZaphodsMap

Description

A variation on TZaphodXmlDoc, required by TZaphodsMapAdmin.

 This class is required by TZaphodsMapAdmin and is primarily of interest to programmers wanting to writing utilities for maintaining ZaphodsMap configuration files.

[ZaphodsMap Index]


ZCNode Method of TZaphodXmlDocAdmin
ZCNode Method

Declaration

Public
 function ZCNode(StartNode: TZaphodNode; XPath: array of const; const ContextUsage: TContextUsage; const Context: string; const AllowCreate: Boolean = False): TZaphodNode;

Applies to

TZaphodXmlDocAdmin

Description

[ZaphodsMap Index]


ZCNodeAttr Method of TZaphodXmlDocAdmin
ZCNodeAttr Method

Declaration

Public
 function ZCNodeAttr(StartNode: TZaphodNode; XPath: array of const; const ContextUsage: TContextUsage; const Context: string; const DefaultResult: Variant; const SelectAttributeID: string = 'value'): Variant;

Applies to

TZaphodXmlDocAdmin

Description

[ZaphodsMap Index]


ZCNodeAttrSave Method of TZaphodXmlDocAdmin
ZCNodeAttrSave Method

Declaration

Public
 function ZCNodeAttrSave(StartNode: TZaphodNode; XPath: array of const; const ContextUsage: TContextUsage; const Context: string; const Value: Variant; const SelectAttributeID: string = 'value'; const AllowCreate: Boolean = True): Boolean;

Applies to

TZaphodXmlDocAdmin

Description

[ZaphodsMap Index]


ZCNodeValue Method of TZaphodXmlDocAdmin
ZCNodeValue Method

Declaration

Public
 function ZCNodeValue(StartNode: TZaphodNode; XPath: array of const; const ContextUsage: TContextUsage; const Context: string; const DefaultResult: Variant): Variant;

Applies to

TZaphodXmlDocAdmin

Description

[ZaphodsMap Index]


ZCNodeValueSave Method of TZaphodXmlDocAdmin
ZCNodeValueSave Method

Declaration

Public
 function ZCNodeValueSave(StartNode: TZaphodNode; XPath: array of const; const ContextUsage: TContextUsage; const Context: string; const Value: Variant; const AllowCreate: Boolean = True): Boolean;

Applies to

TZaphodXmlDocAdmin

Description

[ZaphodsMap Index]


TZaphodXmlDoc Events

| Class | Properties | Methods | Events |

Public

• OnNodeCompare

• OnNodeLoaded

• OnNodeNew

• OnProgress

• OnUnicodeLoss

[ZaphodsMap Index]


TZaphodXmlDocAdmin Events

| Class | Properties | Methods | Events |

Public

• OnNodeCompare

• OnNodeLoaded

• OnNodeNew

• OnProgress

• OnUnicodeLoss

[ZaphodsMap Index]


TZaphodXmlDoc Methods

| Class | Properties | Methods | Events |

Public

• Assign

• BeginUpdate

• CancelUpdate

• Clear

• ClearWarnings

• Create

• CreateName

• DeleteVar

• Destroy

• EndUpdate

• FullXPath

• IsEmpty

• LoadFile

• LoadFromFile

• LoadFromStream

• ReadFromString

• ResolveEntityReferences

• SaveFile

• SaveToFile

• SaveToStream

• SaveVar

• SaveVarDelimiters

• VarDelimitersInUse

• VarGetDelimiters

• VarIsInUse

• VarValue

• WriteToString

• ZNode

• ZNodeAttr

• ZNodeAttrSave

• ZNodeValue

• ZNodeValueSave

[ZaphodsMap Index]


TZaphodXmlDocAdmin Methods

| Class | Properties | Methods | Events |

Public

• Assign

• BeginUpdate

• CancelUpdate

• Clear

• ClearWarnings

• Create

• CreateName

• DeleteVar

• Destroy

• EndUpdate

• FullXPath

• IsEmpty

• LoadFile

• LoadFromFile

• LoadFromStream

• ReadFromString

• ResolveEntityReferences

• SaveFile

• SaveToFile

• SaveToStream

• SaveVar

• SaveVarDelimiters

• VarDelimitersInUse

• VarGetDelimiters

• VarIsInUse

• VarValue

• WriteToString

• ZCNode

• ZCNodeAttr

• ZCNodeAttrSave

• ZCNodeValue

• ZCNodeValueSave

• ZNode

• ZNodeAttr

• ZNodeAttrSave

• ZNodeValue

• ZNodeValueSave

[ZaphodsMap Index]


TZaphodXmlDoc Properties

| Class | Properties | Methods | Events |

Public

• AbortParsing

• BinaryEncoding

• CommentString

• ContextAttributeID

• ContextDefault

• DropCommentsOnParse

• EncodingString

• EntityByName

• ErrorDetailAllowed

• ExternalEncoding

• IndentString

• KeyIndex

• LastError

• LastNode

• LastNodeAttrFound

• LastNodeContextUsage

• LastNodeContextUsed

• LastNodeContextValue

• LastNodeSelectAttrID

• ParserWarnings

• Root

• RootNodeList

• SortAttributes

• StyleSheetString

• UseFullNodes

• Utf8Encoded

• VersionString

• Warnings

• WriteOnDefault

• XmlFormat

• XmlOK

[ZaphodsMap Index]


TZaphodXmlDocAdmin Properties

| Class | Properties | Methods | Events |

Public

• AbortParsing

• BinaryEncoding

• CommentString

• ContextAttributeID

• ContextDefault

• DropCommentsOnParse

• EncodingString

• EntityByName

• ErrorDetailAllowed

• ExternalEncoding

• IndentString

• KeyIndex

• LastError

• LastNode

• LastNodeAttrFound

• LastNodeContextUsage

• LastNodeContextUsed

• LastNodeContextValue

• LastNodeSelectAttrID

• ParserWarnings

• Root

• RootNodeList

• SortAttributes

• StyleSheetString

• UseFullNodes

• Utf8Encoded

• VersionString

• Warnings

• WriteOnDefault

• XmlFormat

• XmlOK

[ZaphodsMap Index]


NativeXml Unit

Classes

•  TXmlNode

•  TXmlNodeList

•  TNativeXml

•  TsdBufferedStream

•  TsdBufferedReadStream

•  TsdBufferedWriteStream

•  TsdCodecStream

•  TsdAnsiStream

•  TsdUtf8Stream

Methods

•  AddControlChars

•  AnsiExtractQuotedStr

•  AnsiPos

•  AnsiQuotedStr

•  Assign

•  Assign

•  AttributeAdd

•  AttributeDelete

•  AttributeExchange

•  AttributeIndexByname

•  AttributesClear

•  BufferLength

•  BufferRead

•  BufferWrite

•  Clear

•  Clear

•  Create

•  Create

•  Create

•  Create

•  Create

•  Create

•  CreateName

•  CreateName

•  CreateNameValue

•  CreateType

•  DecodeBase64

•  DecodeBinHex

•  Delete

•  DeleteEmptyNodes

•  Destroy

•  Destroy

•  Destroy

•  Destroy

•  Destroy

•  EncodeBase64

•  EncodeBinHex

•  EscapeString

•  FindNode Find a single node in an XML document.

•  FindNodes ... Find a set of nodes in an XML document.

•  FindString

•  FreeAndNil

•  FromAnsiString

•  FromWidestring

•  HasAttribute

•  IndexInParent

•  IsClear

•  IsEmpty

•  IsEmpty

•  IsEqualTo

•  LoadFromFile

•  LoadFromStream

•  NodeAdd

•  NodeByAttributeValue

•  NodeByElementType

•  NodeByName

•  NodeDelete

•  NodeExchange

•  NodeExtract

•  NodeFindOrCreate

•  NodeIndexByName

•  NodeIndexByNameFrom

•  NodeIndexOf

•  NodeInsert

•  NodeNew

•  NodeNewAtIndex

•  NodeRemove

•  NodesByName

•  NodesClear

•  ParseAttributes

•  QuoteString

•  Read

•  Read

•  Read

•  Read

•  ReadAttributeInteger

•  ReadAttributeString

•  ReadBool

•  ReadBrush

•  ReadColor

•  ReadDateTime

•  ReadFloat

•  ReadFont

•  ReadFromString

•  ReadInt64

•  ReadInteger

•  ReadPen

•  ReadString

•  ReadWidestring

•  RemoveControlChars

•  ResolveEntityReferences

•  SaveToFile

•  SaveToStream

•  Seek

•  Seek

•  Seek

•  Seek

•  SortChildNodes

•  TXMLNodeCompareFunction

•  TXmlNodeCompareEvent

•  ToAnsiString

•  ToWidestring

•  TrimPos

•  UnEscapeStringANSI

•  UnEscapeStringUTF8

•  UnQuoteString

•  ValueAsBoolDef

•  ValueAsDateTimeDef

•  ValueAsFloatDef

•  ValueAsInt64Def

•  ValueAsIntegerDef

•  Write

•  Write

•  Write

•  Write

•  WriteAttributeInteger

•  WriteAttributeString

•  WriteBool

•  WriteBrush

•  WriteColor

•  WriteDateTime

•  WriteFloat

•  WriteFont

•  WriteHex

•  WriteInt64

•  WriteInteger

•  WritePen

•  WriteString

•  WriteToString

•  WriteToString

•  WriteWidestring

•  sdAnsiToUtf8

•  sdDateTimeFromString

•  sdDateTimeFromStringDefault

•  sdDateTimeToString

•  sdUnicodeToUtf8

•  sdUtf8ToAnsi

•  sdUtf8ToUnicode

[ZaphodsMap Index]


ZaphodsMap Unit

Classes

•  EZaphodException

•  TZaphodXmlDoc

•  TZaphodXmlDocAdmin

•  TZaphodKey

•  TZaphodsMap

•  TZaphodsMapAdmin

Methods

•  ActivateKey

•  ActivateKeyDoc

•  ActivateKeyDocEx

•  ActivateKeyEx

•  ActivateTempKey

•  ActivateTempKeyDoc

•  ActivateTempKeyDocEx

•  ActivateTempKeyEx

•  BeginUpdate

•  CancelUpdate

•  ClearWarnings

•  Create

•  Create

•  CreateForBranch  ... Creates a TZaphodsMap instance for a specific branch (folder).

•  CreateForBranch

•  CreateForService

•  CreateKey

•  CreateKeyedFileFromString

•  DeactivateAllKeys

•  DeactivateKey

•  DeleteVar

•  Destroy

•  Destroy

•  Destroy

•  EndUpdate

•  FullXPath

•  GetAsVariant

•  GetZMKeyProperties

•  KeyedFileName

•  KeyedFileNameEx

•  KeyedFolder

•  KeyedFolderEx

•  KeyedValue

•  KeyedValueEx

•  LoadFile

•  LoadFromFile

•  Reset

•  SaveFile

•  SaveToFile

•  SaveVar

•  SaveVarDelimiters

•  SetLocalKeyboxLocation

•  VarDelimitersInUse

•  VarGetDelimiters

•  VarIsInUse

•  VarValue

•  XPathAttr

•  XPathBuilder

•  XPathOfNode

•  ZCNode

•  ZCNodeAttr

•  ZCNodeAttrSave

•  ZCNodeValue

•  ZCNodeValueSave

•  ZNode

•  ZNodeAttr

•  ZNodeAttrSave

•  ZNodeValue

•  ZNodeValueSave

•  ZaphodAssertDirectoryFor

•  ZaphodException

•  ZaphodExceptionFmt

•  ZaphodKeyedFileName  ... Retrieves a filespec (path and filename) from a keybox.

•  ZaphodKeyedFileZNodeAttr  ... Find a node and retrieve a string from an attribute, using common ZM features.

•  ZaphodKeyedFolder ... Retrieves a folder name from a keybox.

•  ZaphodKeyedValue ... Retrieves a string from a keybox.

•  ZaphodMinimalXMLDoc ... Creates a string which is a iminimalist XML document.

[ZaphodsMap Index]


ZaphodsMapSetup Unit

Classes

•  TZaphodsMapSetup

Methods

•  Create

•  CreateForBranch  ... Creates a TZaphodsMapSetup instance for a specific branch (folder).

•  CreateForService

•  CreateZMBranch ... Create a branch (folder) under the ZM root folder.

•  CreateZMContextFile

•  CreateZMGlobalFile

•  CreateZMKeybox

•  DeleteKey

•  DeleteKeyEx

•  DeleteKeyGroup

•  DeleteKeyGroupVar

•  DeleteKeyboxVar

•  DeleteZMBranch

•  DeleteZMContextFile

•  DeleteZMGlobalFile

•  DeleteZMKeybox

•  DeleteZMSubBranch

•  Destroy

•  DirectoryCount

•  FileAndDirectoryCount

•  GetKeyboxGroupVarByName

•  GetKeyboxVarByName

•  GetKeyboxVarDelimiters

•  SaveKey

•  SaveKeyEx

•  SaveKeyGroup

•  SaveKeyGroupVar

•  SaveKeyboxVar

•  SaveKeyboxVarDelimiters

•  ZaphodsMapEnvVarCreate

[ZaphodsMap Index]


URL Not Available

file:/L|/compdocs/0zaphodsmap.htm


URL Not Available

file:/L|/compdocs/ZM/global/94239.htm


URL Not Available

file:/L|/compdocs/ZM/global/94241.htm


URL Not Available

file:/L|/compdocs/ZM/TContext/94481.htm


URL Not Available

file:/L|/compdocs/ZM/TContext/94485.htm


URL Not Available

file:/L|/compdocs/ZM/TContext/94685.htm


URL Not Available

file:/L|/compdocs/ZM/TErrorDe/94495.htm


URL Not Available

file:/L|/compdocs/ZM/TKeyboxL/94682.htm


URL Not Available

file:/L|/compdocs/ZM/TKeyboxU/94468.htm


URL Not Available

file:/L|/compdocs/ZM/TLocalKe/94473.htm


URL Not Available

file:/L|/compdocs/ZM/TsdStrea/94393.htm


URL Not Available

file:/L|/compdocs/ZM/TUserNam/94488.htm


URL Not Available

file:/L|/compdocs/ZM/TUserNam/94492.htm


URL Not Available

file:/L|/compdocs/ZM/TZaphodK/94477.htm


URL Not Available

http://www.simdesign.nl/xml.html