5
我是一個試圖學習MATLAB的完整編程初學者。我想從一堆不同的xml文件中提取數字數據。數字數據項由標籤和邊界限定。我如何在MATLAB中編寫程序?使用MATLAB從xml文件中提取數據
我的算法:
1. Open the folder
2. Look into each of 50 xml files, one at a time
3. Where the tag <HNB.1></HNB.1> exists, copy numerical contents between said tag and write results into a new file
4. The new file name given for step 3 should be the same as the initial file name read in Step 2, being appended with "_data extracted"
例如:
FileName = Stewart.xml
Contents = blah blah blah <HNB.1>2</HNB.1> blah blah
NewFileName = Stewart_data extracted.txt
Contents = 2
可能重複:HTTP://計算器.COM /問題/ 6582250 /提取數據之間兩標籤功能於HTML文件,MATLAB – Amro