Re: DOM-like API in C/C++ ?
Kirill Simonov <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Johan, > I use YAML a lot in Perl and Ruby. But now I need to access YAML-files > from C++ programs too. I have searched for any existing libraries to > use, but haven't found any obvious choice. > > I have started to look at libYAML. It seems to provide a SAX-like API, > but I was looking for a DOM-like API. > > Does such an API exist? > Or should I just build such an API myself on top of libYAML? Syck (http://code.whytheluckystiff.net/syck/) provides a DOM-like API. AFAIK Syck is the default parser for Ruby, so it makes sense to use it if you are going to read/write same documents from both Ruby and C++. It's not very difficult to write a DOM wrapper over LibYAML, you could take http://pyyaml.org/browser/libyaml/trunk/src/loader.c and http://pyyaml.org/browser/libyaml/trunk/src/dumper.c as a model. Thanks, Kirill ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/