2016-04-27 66 views
1

我有這個XML文件,其中我需要特定標記的值。我正在使用testcomplete作爲工具並使用c#腳本將其編碼。有關如何執行此操作的任何建議?在testcomplete中搜索特定屬性值的xml文件

+2

把*一些*努力英寸只是谷歌搜索「C#xml獲取元素的價值」將得到大量的結果 - LINQ到XML可能是最好的解決方案。當您遇到*特定*問題時提出問題。 –

回答

1

要使用XML文件的工作在TestComplete,你可以使用下列對象:

XML DOM objects. You can use these objects to work with any XML file. Working with these objects requires more efforts and knowledge of XML DOM. However, we suggest that you use these objects to work with XML files. 

TestComplete’s Storages object. You use the methods and properties of this object to write data to and read it from XML files. However, this object works only with XML files created with the Storage.XML method (such files have a specific format, they include sections, subsections and options). For more information on this, see Section Object. If you try to open an XML file that has another format by using the Storage.XML method, an error will occur. 

enter link description here