我正在尝试从.cfg文件中读取我对YAML的了解不够,但我想这样做:
我的配置文件使用YAML。
Residences: luchidv: EnterMessage: Estas entrando la residencia %residence de %owner. BlackList: Type: BLACKLIST ItemList: [] LeaveMessage: Ahora estas saliendo de %residence. IgnoreList: Type: IGNORELIST ItemList: [] Areas: main: X1: -1560 Y1: 99 Z1: 1457
那么,Delphi如何解析该配置文件的内容呢? 我需要通过示例读取值:
Line:13
X1: -1560
知道该怎么做吗?
我一直在寻找,我发现了这个:
http://pyyaml.org/wiki/LibYAML
由于
答案 0 :(得分:2)
Google for“Delphi yaml parser”,第六个结果是https://bitbucket.org/OCTAGRAM/delphi-yaml/wiki/Home
第一个结果甚至更好:YAML parser in Delphi?