Class TWPXMLOneLevel
Hierarchy
System.TObject | System.Classes.TList | TWPXMLOneLevel
Description
TWPXMLOneLevel represents each tag in the XML file. The first element is strored in TWPXMLTree.Tree. From there you can find all elements and children. The tags all have a name and can also have parameters. The class provides menas to also read and write the content, this is the text between the start and the end XML tag. You can use your own class which inherits from TWPXMLOneLevel. Doing so, you can manage variables which each tag automatically. This can be, for example, screen coordinates if the data in the XML tree is redered somehow. To use your own class you need to override TWPCustomXMLTree and in the constructor assign the class reference to your element class to the protected variable FItemClass.Properties
Property AnyData : TObject
Property AsString : string
Property ColonText : string
Property CommaText : string
Property Comment : string
Property Content : AnsiString
Property ContentF : Double
Property ContentI : Integer
Property ContentIsUTF8 : Boolean
Property ContentsAsString : string
Property ContentText : WideString
Property ContentW : WideString
Property Elements[index] : TWPXMLOneLevel
Property FirstElement : TWPXMLOneLevel
Property IsCDATA : Boolean
Property IsClosed : Boolean
Property IsText : Boolean
Property IsTextElement : Boolean
Property Modes : TWPXMLOneLevelModes
Property Name : AnsiString
Property NameSpace : string
Property Obj : TObject
Property OwnerTree : TWPCustomXMLTree
Property ParamCount : Integer
Property ParamFValue[index] : Double
Property ParamInheritedValue[index] : string
Property Params : TStringList
Property ParamValue[index] : string
Property Parent : TWPXMLOneLevel
Property Path : string
Property ReadPos : Integer
Property Selected : Boolean
Property UTF8 : Boolean
Property WriteLineBreak : Boolean
Property WriteLineBreakForParams : Boolean
Methods
Procedure AddParam(ParamName:string; Value:string; Overwrite:Boolean)
Procedure AddParamDef(ParamName:string; Value:string; aDefault:string)
Procedure AddParamF(Name:string; Value:Double; Overwrite:Boolean)
Procedure AddParamI(Name:string; Value:Integer; Overwrite:Boolean)
Procedure AddParams(InitialParamNamesAndValues:; Overwrite:Boolean)
Function AddRDF : TWPXMLOneLevel
Function AddRDFDescription(xmlns:string; xmlurl:string) : TWPXMLOneLevel
Function AddTag(TagPathName:string; Added:Boolean) : TWPXMLOneLevel
Function AddTagValue(TagPathName:string; Value:Integer) : TWPXMLOneLevel
Procedure AppendParam(ParamName:string; ParamValue:string)
Function AppendRDFContainer(cType:TWPRDFContainer; Values:) : TWPXMLOneLevel
Function AppendRDFTag(xmlns:string; aName:string) : TWPXMLOneLevel
Function AppendTag(Name:string; bIsClosed:Boolean) : TWPXMLOneLevel
Function AppendTagIfNeeded(Name:string; paramname:string; paramvalue:string) : TWPXMLOneLevel
Function AppendTagIfNotExists(Name:string) : TWPXMLOneLevel
Procedure Assign(ASource:TWPXMLOneLevel)
Function BeginUpdate : Boolean
Procedure ClearNameSpace(xmlns:string)
Function ContentTextOfElement(ElementnameLowercase:string) : WideString
Function CopyTree(NewParent:TWPCustomXMLTree) : TWPXMLOneLevel
Create(aOwner:TWPCustomXMLTree)
Function Depth : Integer
Function Duplicate(NewParent:TWPCustomXMLTree) : TWPXMLOneLevel
Function ElementsAsStringDelete(ElementName:string; ParamName:string; ParamValue:string) : Boolean
Function ElementsAsStringsGet(Dest:TStrings; ElementName:string; ParamName:string) : Integer
Function ElementsAsStringsSet(Source:TStrings; ElementName:string; ParamName:string) : Integer
Function FastFind(TagName:string) : TWPXMLOneLevel
Function Find(sublevel:TWPXMLOneLevel) : TWPXMLOneLevel
Function FindParamInherited(TagName:string; ParamName:string; ParamValue:string) : TWPXMLOneLevel
Function FindParamRecursive(TagName:string; ParamName:string; ParamValue:string) : TWPXMLOneLevel
Function FindPath(TagPathName:string) : TWPXMLOneLevel
Function FindRecursive(TagName:string) : TWPXMLOneLevel
Function FindText(Text:string; CaseSensitive:Boolean; Recursive:Boolean; List:TList) : TWPXMLOneLevel
Function GetAnyData : TObject
Function GetAsString : string
Function GetColonText : string
Function GetCommaText : string
Function GetContent : AnsiString
Function GetContentF : Double
Function GetContentI : Integer
Function GetContentsAsString : string
Function GetContentText : WideString
Function GetContentW : WideString
Function GetEValue(TagName:string; DefValue:Integer) : Integer
Function GetFirstElement : TWPXMLOneLevel
Function GetInheritedParamValue(index:string) : string
Function GetIsCDATA : Boolean
Function GetIsTextElement : Boolean
Function GetNamespace : string
Function GetParam(ParamName:string; Value:string) : Boolean
Function GetParamCount : Integer
Procedure GetParamFValueDef(ParamName:string; Value:Double)
Function GetParams : TStringList
Function GetParamValue(index:string) : string
Function GetPath : string
Function GetSelectedInheritedParamValue(index:string; possibletags:) : string
Function GetSubElement(index:Integer) : TWPXMLOneLevel
Function GetSValue(TagName:string) : string
Function GetUTF8 : Boolean
Function HasElement(TagName:string) : Boolean
Function HasParam(index:string; value:string) : Boolean
Function InsertTagAsFirst(Name:string) : TWPXMLOneLevel
Function InsideName(LowerCaseName:string) : Boolean
Function InternAddTagValue(TagPathName:string; Value:string; SetValue:Boolean; Added:Boolean) : TWPXMLOneLevel
Procedure MergeParams(Source:TStrings)
Procedure MergeParamsDontFree(Source:TStrings)
Function NameEqual(LowerCaseName:string) : Boolean
Procedure Notify(Ptr:Pointer; Action:TListNotification)
Procedure ParamDelete(index:string)
Function ParamsAsXMLValue(ExludeParamsList:string) : string
Function ParamValueDef(ParamName:string; DefValue:string) : string
Function ParamvalueIs(index:string; value:string) : Boolean
Procedure ParamvalueToggle(index:string; value1:string; value2:string)
Function ParamvalueUndefinedOr(index:string; value:string) : Boolean
Function RDFContainerRead(cType:TWPRDFContainer; N:Integer) : string
Function RDFContainerReadF(cType:TWPRDFContainer; N:Integer) : Double
Function RDFContainerType(cType:TWPRDFContainer; cCount:Integer) : Boolean
Function RDFDescriptionFind(xmlns:string; xmlns_url:string) : TWPXMLOneLevel
Function RDFFind(IgnoreNS:Boolean) : TWPXMLOneLevel
Function RDFObjectAppend(xmlns:string; aName:string) : TWPXMLOneLevel
Function RDFObjectFind(xmlns:string; aName:string; pdfobject:TWPXMLOneLevel; index:Integer) : Boolean
Function RDFObjectInit : Integer
Procedure ReadParams(Source:TWPXMLOneLevel; All:Boolean; NeutralString:string; ExceptList:)
Procedure SaveToFile(FileName:string; WithPath:Boolean)
Procedure SaveToStream(Stream:TStream; WithPath:Boolean)
Procedure SetAnyData(x:TObject)
Procedure SetContent(x:AnsiString)
Procedure SetContentF(x:Double)
Procedure SetContentI(x:Integer)
Procedure SetContentText(x:WideString)
Procedure SetContentW(x:WideString)
Procedure SetEValue(TagName:string; Value:Integer)
Procedure SetISCDATA(x:Boolean)
Procedure SetIsTextElement(x:Boolean)
Procedure SetName(x:AnsiString)
Procedure SetNewParams(NewParams:TStringList)
Procedure SetParamFValue(index:string; Value:Double)
Procedure SetParams(x:TStringList)
Procedure SetParamValue(index:string; Value:string)
Procedure SetParent(x:TWPXMLOneLevel)
Procedure SetSelected(x:Boolean)
Procedure SetSValue(TagName:string; Value:string)
Function SwapWithNext : Boolean
Function SwapWithPrev : Boolean
Procedure WriteParams(Dest:TWPXMLOneLevel; NeutralString:string; ExceptList:; OnlyOverwrite:Boolean)
Function XMLBinaryProps : string