List of apple (plist) properties in C ++

I am instructed to read Apple property list files in a C ++ application. The main focus is on xml-type plist files specified in OS X that mimic an implementation of the xml type. This describes the implementation of their property list:

http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man5/plist.5.html

I am wondering if there are classes or libraries available that can already read this type of implementation in standard C ++ (not Objective-C); hoping to find something and not collapse our own. Are open source versions available?

+4
source share
2 answers

PList files not only mimic XML, but also XML, including valid XML headers.

Any XML reader should be able to parse these files as a result. If you are looking for a boolean class that abstracts files, I don't know about the existing ones. Given the Apple documentation, you can write it yourself using an XML reader, although it will take some work to be fully compatible.

+1
source

Is this the target?

There is a rude solution for Windows consisting of using the functions of the iTunes dynamic libraries to analyze plist files (working in binary or text format).

This is code originally written for the iPod interface, but you can easily extract a few features that interest you.

The repository is on this project page: http://code.google.com/p/t-pot/

Look for the iPoTApi.h and iPoTApi.cpp file, the TranslatePLIST function of the CiPoTApi class.

I want a better solution when I try to compile it from Apple's Windows-oriented sources, but this is a real nightmare and there are no files. Therefore, the use of their libraries was a significant shortcut.

0
source

All Articles