我已经成功让我的应用程序从xml文档中读取一些值,但是我不确定如何存储它们,因为每个元素目前有6个信息需要存储。
XML示例:
<?xml version="1.0" encoding="utf-8"?>
<App>
<Name>First Application </Name>
<FileName>1.exe</FileName>
<FilePath>C:\</FilePath>
<Third_Parameter>etc</Third_Parameter>
<Forth_Parameter>etc</Forth_Parameter>
<Name>Application 2</Name>
<FilePath></FilePath>
<Third_Parameter>etc</Third_Parameter>
<Forth_Parameter>etc</Forth_Parameter>
</App>
我在考虑使用一个带有唯一ID的数组,因为我已经为每个应用程序都有一个ID了,但我不知道如何动态创建一个以另一个变量名命名的数组。我尝试使用字典,但是我有超过两个变量,并且不知道如何让它与之配合。
基本上,我需要一种存储所有这些信息的方式,可以无限地添加应用程序,而不使用数据库。