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 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:string) : TWPXMLOneLevel
Procedure AppendParam(ParamName:string; ParamValue:Double)
Function AppendRDFContainer(cType:TWPRDFContainer; Values:) : TWPXMLOneLevel
Function AppendRDFTag(xmlns:string; aName:string) : TWPXMLOneLevel
Function AppendTag(Name:string) : TWPXMLOneLevel
Function AppendTagIfNeeded(Name:string; InitialParamNamesAndValues:) : TWPXMLOneLevel
Function AppendTagIfNotExists(Name:string) : 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 Find(AName:string; ParamName:string; ParValue:string; res:TWPXMLOneLevel) : Boolean
Function FindParamInherited(TagName:string; ParamName:string; ParamValue:string) : TWPXMLOneLevel
Function FindParamRecursive(TagName:string; ParamName:string; ParamValue:string) : TWPXMLOneLevel
Function FindText(Text:string; CaseSensitive:Boolean; Recursive:Boolean; List:TList) : TWPXMLOneLevel
Function GetEValue(TagName:string; DefValue:Integer) : Integer
Function GetParam(ParamName:string; Value:string) : Boolean
Procedure GetParamFValueDef(ParamName:string; Value:Double)
Function GetSValue(TagName:string) : string
Function HasElement(TagName:string) : Boolean
Function HasParam(index:string; value:string) : Boolean
Function InsertTagAsFirst(Name:string) : TWPXMLOneLevel
Function InsideName(LowerCaseName:string) : Boolean
Procedure MergeParams(Source:TStrings)
Procedure MergeParamsDontFree(Source:TStrings)
Function NameEqual(LowerCaseName:string) : Boolean
Procedure ParamDelete(index:string)
Function ParamsAsXMLValue(ExludeParamsList:string) : string
Function ParamValueDef(ParamName:string; DefValue:Integer) : Integer
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) : 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 SetEValue(TagName:string; Value:Integer)
Procedure SetSValue(TagName:string; Value:string)
Function SwapWithNext : Boolean
Function SwapWithPrev : Boolean
Procedure WriteParams(Dest:TWPXMLOneLevel; NeutralString:string; ExceptList:; OnlyOverwrite:Boolean)
Function XMLBinaryProps : string