使用 IntraWeb (31) - IntraWeb 的 Xml 操作使用的是 NativeXml


在 IWNativeXml 单元. 知道了这个, 以后在其他 Delphi 程序中也可以直接 Uses IWNativeXml 了.
TNativeXml (IWNativeXml.TNativeXml < TPersistent < TObject) 的主要成员:
property AbortParsing: Boolean
property BinaryEncoding: TBinaryEncodingType
property CommentString: UTF8String
property DropCommentsOnParse: Boolean
property EncodingString: UTF8String
property ExternalEncoding: TStringEncodingType
property FloatAllowScientific: Boolean
property FloatSignificantDigits: Integer
property IndentString: UTF8String
property Root: TXmlNode
property RootNodeList: TXmlNode
property StyleSheetNode: TXmlNode
property UseFullNodes: Boolean
property Utf8Encoded: Boolean
property VersionString: UTF8String
property WriteOnDefault: Boolean
property XmlFormat: TXmlFormatType
property ParserWarnings: Boolean
property EntityByName[AName: UTF8String]: UTF8String

property OnNodeCompare: TXmlNodeCompareEvent
property OnNodeNew: TXmlNodeEvent
property OnNodeLoaded: TXmlNodeEvent
property OnProgress: TXmlProgressEvent
property OnUnicodeLoss: TNotifyEvent

constructor Create
constructor CreateName(const ARootName: UTF8String)
class destructor Destroy
procedure Assign(Source: TPersistent)
procedure Clear
function IsEmpty: Boolean
procedure LoadFromStream(Stream: TStream)
procedure LoadFromFile(const AFileName: string)
procedure ReadFromString(const AValue: UTF8String)
procedure ResolveEntityReferences
procedure SaveToStream(Stream: TStream)
procedure SaveToFile(const AFileName: string)
function WriteToString: UTF8String
function GetEntityByName(AName: UTF8String): UTF8String

TXmlNode (IWNativeXml.TXmlNode < TPersistent < TObject) 的主要成员:
property AttributeCount: Integer
property BinaryEncoding: TBinaryEncodingType
property BinaryString: RawByteString
property CascadedName: UTF8String
property Document: TNativeXml
property ElementType: TXmlElementType
property FullPath: UTF8String
property Name: UTF8String
property Parent: TXmlNode
property NodeCount: Integer
property Tag: Integer
property TotalNodeCount: Integer
property TreeDepth: Integer
property ValueAsBool: Boolean
property ValueAsDateTime: TDateTime
property ValueAsInt64: Int64
property ValueAsInteger: Integer
property ValueAsFloat: Double
property ValueAsString: UTF8String
property ValueAsUnicodeString: string
property ValueDirect: UTF8String
property WriteOnDefault: Boolean

property AttributeByName[const AName: UTF8String]: UTF8String
property AttributeByNameWide[const AName: UTF8String]: string
property AttributeName[Index: Integer]: UTF8String
property AttributePair[Index: Integer]: UTF8String
property AttributeValue[Index: Integer]: UTF8String
property AttributeValueAsUnicodeString[Index: Integer]: string
property AttributeValueAsInteger[Index: Integer]: Integer
property AttributeValueDirect[Index: Integer]: UTF8String
property Nodes[Index: Integer]: TXmlNode

constructor Create(ADocument: TNativeXml)
constructor CreateName(ADocument: TNativeXml; const AName: UTF8String)
constructor CreateNameValue(ADocument: TNativeXml; const AName: UTF8String; const AValue: UTF8String)
constructor CreateNameValue(ADocument: TNativeXml; const AName: string; const AValue: string)
constructor CreateType(ADocument: TNativeXml; AType: TXmlElementType)
procedure Assign(Source: TPersistent)
procedure Delete
procedure DeleteEmptyNodes
class destructor Destroy
procedure AttributeAdd(const AName: UTF8String; AValue: Integer)
procedure AttributeAdd(const AName: UTF8String; const AValue: UTF8String)
procedure AttributeDelete(Index: Integer)
procedure AttributeExchange(Index1: Integer; Index2: Integer)
function AttributeIndexByname(const AName: UTF8String): Integer
procedure AttributesClear
procedure BufferRead(var Buffer; Count: Integer)
procedure BufferWrite(const Buffer; Count: Integer)
function BufferLength: Integer
procedure Clear
function FindNode(const NodeName: UTF8String): TXmlNode
procedure FindNodes(const NodeName: UTF8String; const AList: TList)
function FromAnsiString(const s: AnsiString): UTF8String
function FromUnicodeString(const W: string): UTF8String
function HasAttribute(const AName: UTF8String): Boolean
function IndexInParent: Integer
function IsClear: Boolean
function IsEmpty: Boolean
function IsEqualTo(ANode: TXmlNode; Options: TXmlCompareOptions; MismatchNodes: TList): Boolean
function NodeAdd(ANode: TXmlNode): Integer
function NodeByAttributeValue(const NodeName: UTF8String; const AttribName: UTF8String; const AttribValue: UTF8String; ShouldRecurse: Boolean): TXmlNode
function NodeByElementType(ElementType: TXmlElementType): TXmlNode
function NodeByName(const AName: UTF8String): TXmlNode
procedure NodeDelete(Index: Integer)
procedure NodeExchange(Index1: Integer; Index2: Integer)
function NodeExtract(ANode: TXmlNode): TXmlNode
function NodeFindOrCreate(const AName: UTF8String): TXmlNode
function NodeIndexByName(const AName: UTF8String): Integer
function NodeIndexByNameFrom(const AName: UTF8String; AFrom: Integer): Integer
function NodeIndexOf(ANode: TXmlNode): Integer
procedure NodeInsert(Index: Integer; ANode: TXmlNode)
function NodeNew(const AName: UTF8String): TXmlNode
function NodeNewAtIndex(Index: Integer; const AName: UTF8String): TXmlNode
function NodeRemove(ANode: TXmlNode): Integer
procedure NodesClear
procedure NodesByName(const AName: UTF8String; const AList: TList)

你可能感兴趣的:(使用 IntraWeb (31) - IntraWeb 的 Xml 操作使用的是 NativeXml)