首页 > 代码库 > 使用 IntraWeb (31) - IntraWeb 的 Xml 操作使用的是 NativeXml

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


在 IWNativeXml 单元. 知道了这个, 以后在其他 Delphi 程序中也可以直接 Uses IWNativeXml 了.

TNativeXml (IWNativeXml.TNativeXml < TPersistent < TObject) 的主要成员:
property AbortParsing: Booleanproperty BinaryEncoding: TBinaryEncodingTypeproperty CommentString: UTF8Stringproperty DropCommentsOnParse: Booleanproperty EncodingString: UTF8Stringproperty ExternalEncoding: TStringEncodingTypeproperty FloatAllowScientific: Booleanproperty FloatSignificantDigits: Integerproperty IndentString: UTF8Stringproperty Root: TXmlNodeproperty RootNodeList: TXmlNodeproperty StyleSheetNode: TXmlNodeproperty UseFullNodes: Booleanproperty Utf8Encoded: Booleanproperty VersionString: UTF8Stringproperty WriteOnDefault: Booleanproperty XmlFormat: TXmlFormatTypeproperty ParserWarnings: Booleanproperty EntityByName[AName: UTF8String]: UTF8Stringproperty OnNodeCompare: TXmlNodeCompareEventproperty OnNodeNew: TXmlNodeEventproperty OnNodeLoaded: TXmlNodeEventproperty OnProgress: TXmlProgressEventproperty OnUnicodeLoss: TNotifyEventconstructor Createconstructor CreateName(const ARootName: UTF8String)class destructor Destroyprocedure Assign(Source: TPersistent)procedure Clearfunction IsEmpty: Booleanprocedure LoadFromStream(Stream: TStream)procedure LoadFromFile(const AFileName: string)procedure ReadFromString(const AValue: UTF8String)procedure ResolveEntityReferencesprocedure SaveToStream(Stream: TStream)procedure SaveToFile(const AFileName: string)function WriteToString: UTF8Stringfunction GetEntityByName(AName: UTF8String): UTF8String


TXmlNode (IWNativeXml.TXmlNode < TPersistent < TObject) 的主要成员:
property AttributeCount: Integerproperty BinaryEncoding: TBinaryEncodingTypeproperty BinaryString: RawByteStringproperty CascadedName: UTF8Stringproperty Document: TNativeXmlproperty ElementType: TXmlElementTypeproperty FullPath: UTF8Stringproperty Name: UTF8Stringproperty Parent: TXmlNodeproperty NodeCount: Integerproperty Tag: Integerproperty TotalNodeCount: Integerproperty TreeDepth: Integerproperty ValueAsBool: Booleanproperty ValueAsDateTime: TDateTimeproperty ValueAsInt64: Int64property ValueAsInteger: Integerproperty ValueAsFloat: Doubleproperty ValueAsString: UTF8Stringproperty ValueAsUnicodeString: stringproperty ValueDirect: UTF8Stringproperty WriteOnDefault: Booleanproperty AttributeByName[const AName: UTF8String]: UTF8Stringproperty AttributeByNameWide[const AName: UTF8String]: stringproperty AttributeName[Index: Integer]: UTF8Stringproperty AttributePair[Index: Integer]: UTF8Stringproperty AttributeValue[Index: Integer]: UTF8Stringproperty AttributeValueAsUnicodeString[Index: Integer]: stringproperty AttributeValueAsInteger[Index: Integer]: Integerproperty AttributeValueDirect[Index: Integer]: UTF8Stringproperty Nodes[Index: Integer]: TXmlNodeconstructor 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 Deleteprocedure DeleteEmptyNodesclass destructor Destroyprocedure 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): Integerprocedure AttributesClearprocedure BufferRead(var Buffer; Count: Integer)procedure BufferWrite(const Buffer; Count: Integer)function BufferLength: Integerprocedure Clearfunction FindNode(const NodeName: UTF8String): TXmlNodeprocedure FindNodes(const NodeName: UTF8String; const AList: TList)function FromAnsiString(const s: AnsiString): UTF8Stringfunction FromUnicodeString(const W: string): UTF8Stringfunction HasAttribute(const AName: UTF8String): Booleanfunction IndexInParent: Integerfunction IsClear: Booleanfunction IsEmpty: Booleanfunction IsEqualTo(ANode: TXmlNode; Options: TXmlCompareOptions; MismatchNodes: TList): Booleanfunction NodeAdd(ANode: TXmlNode): Integerfunction NodeByAttributeValue(const NodeName: UTF8String; const AttribName: UTF8String; const AttribValue: UTF8String; ShouldRecurse: Boolean): TXmlNodefunction NodeByElementType(ElementType: TXmlElementType): TXmlNodefunction NodeByName(const AName: UTF8String): TXmlNodeprocedure NodeDelete(Index: Integer)procedure NodeExchange(Index1: Integer; Index2: Integer)function NodeExtract(ANode: TXmlNode): TXmlNodefunction NodeFindOrCreate(const AName: UTF8String): TXmlNodefunction NodeIndexByName(const AName: UTF8String): Integerfunction NodeIndexByNameFrom(const AName: UTF8String; AFrom: Integer): Integerfunction NodeIndexOf(ANode: TXmlNode): Integerprocedure NodeInsert(Index: Integer; ANode: TXmlNode)function NodeNew(const AName: UTF8String): TXmlNodefunction NodeNewAtIndex(Index: Integer; const AName: UTF8String): TXmlNodefunction NodeRemove(ANode: TXmlNode): Integerprocedure NodesClearprocedure NodesByName(const AName: UTF8String; const AList: TList)