开发者

YAML / SnakeYAML: how refer to the same object multiple times

I am using YAML to import data into a db4o database and am wondering how I can structure my documents su开发者_高级运维ch that when I create an object, I can re-use that same object later on in another object. For instance, I declare a content type, and then a file after it that uses that content type.

How do I refer to that content type?

Walter


Using YAML you may represent objects of arbitrary graph-like structures. If you want to refer to the same object from different parts of a document, you need to use anchors and aliases

http://code.google.com/p/snakeyaml/wiki/Documentation#Aliases

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜