Class TrwXMLParser

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TrwXMLParser = class(TObject)

Description

Hierarchy

Overview

Fields

Private fInputStream: TStream;
Private FElementName: string;
Private FAttribs: TStringList;
Private FData: String;
Private FEndFound: boolean;
Private FValidRead: boolean;
Private FBuffer: PChar;
Private FStreamSize: integer;
Private FShowProgress: boolean;

Methods

Private procedure SetAttribs(const Value: TStringList);
Private procedure SetElementName(const Value: string);
Private procedure SetData(const Value: String);
Private procedure SetEndFound(const Value: boolean);
Private procedure SetValidRead(const Value: boolean);
Private procedure TrimSpaces;
Private procedure SetStreamSize(const Value: integer);
Private function ReadNameStr: string;
Private procedure ReadAttrStr(var AAttrib : string; var isLast: boolean);
Private function getNextChar: Char;
Private function CheckNextChar: Char;
Private procedure CharBack;
Private procedure ReadData;
Private procedure SetShowProgress(const Value: boolean);
Public constructor Create(Stream: TStream);
Public destructor Destroy; override;
Public procedure ReadNextElement; virtual;
Public function EOS: boolean;
Public function ValueOf(const aName: string): string;
Public function IntegerData: Integer;
Public function Int64Data: Int64;
Public function FloatData: Extended;

Properties

Public property ValidRead: boolean read FValidRead write SetValidRead;
Public property ElementName: string read FElementName write SetElementName;
Public property Attribs: TStringList read FAttribs write SetAttribs;
Public property Data: String read FData write SetData;
Public property EndFound: boolean read FEndFound write SetEndFound;
Public property StreamSize: integer read FStreamSize write SetStreamSize;
Public property ShowProgress: boolean read FShowProgress write SetShowProgress;

Description

Fields

Private fInputStream: TStream;

the stream which holds the XML formated DFM / component stream

Private FElementName: string;
 
Private FAttribs: TStringList;
 
Private FData: String;
 
Private FEndFound: boolean;
 
Private FValidRead: boolean;
 
Private FBuffer: PChar;
 
Private FStreamSize: integer;
 
Private FShowProgress: boolean;
 

Methods

Private procedure SetAttribs(const Value: TStringList);

property setter for the Attribs

Private procedure SetElementName(const Value: string);

property setter for the ElementName of the last read Element

Private procedure SetData(const Value: String);

property setter for the Data of the last read XML element

Private procedure SetEndFound(const Value: boolean);

property setter for if a end is found in the last read

Private procedure SetValidRead(const Value: boolean);

property setter for if the last read was valid

Private procedure TrimSpaces;

removes the spaces from the current line

Private procedure SetStreamSize(const Value: integer);

Property Setter

Private function ReadNameStr: string;

Reads a validName form the stream

Private procedure ReadAttrStr(var AAttrib : string; var isLast: boolean);

Read a full Attribute from the stream

Private function getNextChar: Char;
 
Private function CheckNextChar: Char;
 
Private procedure CharBack;
 
Private procedure ReadData;
 
Private procedure SetShowProgress(const Value: boolean);
 
Public constructor Create(Stream: TStream);

The constructor gets a Stream which hold the XML formatted DFM / Component stream

Public destructor Destroy; override;

The destructor cleans all temporary claimed memory.

Public procedure ReadNextElement; virtual;

Read the Next Element with all its Attribs and data if on the same line

Public function EOS: boolean;

This function returns true if we are at the end of the stream

Public function ValueOf(const aName: string): string;

Returns the value of Attribute

Public function IntegerData: Integer;

Returns the Data as a Integer

Public function Int64Data: Int64;

The Value can be a 64 bit integer

Public function FloatData: Extended;

Returns the Data as a Float

Properties

Public property ValidRead: boolean read FValidRead write SetValidRead;

True if the last read was ended with a valid Element

Public property ElementName: string read FElementName write SetElementName;

The name of the last read Element

Public property Attribs: TStringList read FAttribs write SetAttribs;

All attributes of the last read Element are saved in a stringlist

Public property Data: String read FData write SetData;

The Data in the form of a string

Public property EndFound: boolean read FEndFound write SetEndFound;

If the Element was closed then this property is true

Public property StreamSize: integer read FStreamSize write SetStreamSize;

The actual size of the stream.

Public property ShowProgress: boolean read FShowProgress write SetShowProgress;
 

Generated by PasDoc 0.10.0 on 2006-10-31 09:56:45