解析 XML 文件后,输出在字典中以以下格式出现现在我想将其转换为字典数组
任何人都可以提出正确的解决方案
Printing description of rootDictionary:
<CFBasicHash 0x8866000 [0x1078b38]>{type = mutable dict, count = 1,
entries =>
0 : <CFString 0x8869490 [0x1078b38]>{contents = "Data"} = <CFBasicHash 0x88695c0 [0x1078b38]>{type = mutable dict, count = 1,
entries =>
0 : <CFString 0x8869610 [0x1078b38]>{contents = "row"} = (
{
Address = {
text = "Skt. Clemens Torv 2-6";
};
City = {
text = "Aarhus C";
};
Country = {
text = Danmark;
};
Description = {
text = Ottopiste;
};
Lat = {
text = "56.156818";
};
Lon = {
text = "10.2092532";
};
Name = {
text = Ottopisteet;
};
Type = {
text = 1;
};
Zip = {
text = 8000;
};
},
{
Address = {
text = "Kauppatie 66";
};
City = {
text = Kauhava;
};
Country = {
text = Finland;
};
Description = {
text = "(null)";
};
Lat = {
text = "63.1001586";
};
Lon = {
text = "23.0463634";
};
Name = {
text = I m Here;
};
Type = {
text = 2;
};
Zip = {
text = 62200;
};
}
)
}
}
现在输出字典再次采用上述格式我想将其转换为字典数组
Actual format of XML for reference:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Data>
<row>
<Lat>56.156818</Lat>
<Lon>10.2092532</Lon>
<City>Aarhus C</City>
<Address>Skt. Clemens Torv 2-6</Address>
<Zip>8000</Zip>
<Country>Danmark</Country>
<Name>Ottopisteet</Name>
<Description>Ottopiste</Description>
<Type>1</Type>
</row>
<row>
<Lat>63.1001586</Lat>
<Lon>23.0463634</Lon>
<City>Kauhava</City>
<Address>Kauppatie 66</Address>
<Zip>62200</Zip>
<Country>Finland</Country>
<Name>I am Here</Name>
<Description>(null)</Description>
<Type>2</Type>
</row>
</Data>