Changeset 42 for trunk/Common/UXmlClasses.pas
- Timestamp:
- Nov 21, 2010, 8:49:46 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/UXmlClasses.pas
r40 r42 5 5 interface 6 6 7 uses Classes, SysUtils, StrUtils, UStringListEx, SpecializedObjectList; 7 uses Classes, SysUtils, StrUtils, SpecializedList, SpecializedObjectList, 8 SpecializedDictionary; 8 9 9 10 type … … 29 30 ShringEmpty: Boolean; 30 31 Name: string; 31 Attributes: T StringListEx;32 Attributes: TDictionaryStringString; 32 33 SubElements: TListObject; // TListObject<TXmlElement>; 33 34 constructor Create; … … 57 58 begin 58 59 ShringEmpty := True; 59 Attributes := TStringListEx.Create; 60 Attributes.NameValueSeparator := '='; 60 Attributes := TDictionaryStringString.Create; 61 61 SubElements := TListObject.Create; 62 62 EndTagSymbol := '/'; … … 82 82 AttributesText := ''; 83 83 for I := 0 to Attributes.Count - 1 do 84 AttributesText := AttributesText + ' ' + Attributes. Names[I] + '="' + Attributes.ValueFromIndex[I]+ '"';84 AttributesText := AttributesText + ' ' + Attributes.Keys[I] + '="' + Attributes[I].Value + '"'; 85 85 86 86 if Name <> '' then begin … … 116 116 Name := '?xml'; 117 117 EndTagSymbol := '?'; 118 Attributes.Add NameValue('version', '1.0');119 Attributes.Add NameValue('encoding', 'utf-8');118 Attributes.Add('version', '1.0'); 119 Attributes.Add('encoding', 'utf-8'); 120 120 end; 121 121 Content := TXmlTag.Create;
Note:
See TracChangeset
for help on using the changeset viewer.