今天写了一个类,其中用到了TXMLDocument控件.这个控件我是要动态生成的. 但是却遇到了非常奇怪的问题,下面分享一下 procedure TMainForm.Button1Click(Sender:TObject); Var XML:TXMLDocument; I:Integer; begin XML:=TXMLDocument.Create(nil); XML.LoadFromFile(ExtractFilePath(Application.ExeName)+'demo.xml');…
XML example, from the OmniXML XPath demo: <?xml version="1.0" encoding="UTF-8"?><bookstore> <book> <title lang="eng">Harry Potter</title> </book> <book> <title lang="eng"…
Description This example illustrates the basic operations on an XML document. Code procedure CreateDocument; const CFilename = 'file.xml'; var LDocument: IXMLDocument; LNodeElement, NodeCData, NodeText: IXMLNode; begin LDocument := TXMLDocument.Creat…
Using TXMLDocument The starting point for working with an XML document is the Xml.XMLDoc.TXMLDocument component. The following steps describe how to use TXMLDocument to work directly with an XML document: Add a TXMLDocument component to your form or…
这里读取'HistoryPath' ,'TracePath' 元素下的‘value’属性使用的是 var xmlCfg: TXMLDocument; .... function ReadXMLCFG: boolean; var ..... HistoryPath: string = ''; TracePath: string = ''; vChild: TDOMNode; ..... begin Result := False; if ... then begin ..... ReadXMLFi…