XML文档:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>name</key> <string>名字</string>
</dict>
</array>
</plist>
解析:
ValueVector p_map = FileUtils::getInstance()->getValueVectorFromFile(@H_403_62@xml Flie);
ValueMap @H_403_62@map=p_map@H_403_62@.at(0)@H_403_62@.asValueMap();
@H_403_62@string str=@H_403_62@map@H_403_62@.at("name")@H_403_62@.asString();
使用过程中没有问题 希望对你有帮助
======== 文档开头是array的要用ValueVector接收,是Dict开头的采用ValueMap接收