示例#1
0
    Node Clone(const Node& node)
    {
		NodeEvents events(node);
        NodeBuilder builder;
        events.Emit(builder);
        return builder.Root();
    }
示例#2
0
Node Load(std::istream& input) {
    Parser parser(input);
    NodeBuilder builder;
    if(!parser.HandleNextDocument(builder))
        return Node();

    return builder.Root();
}
示例#3
0
std::vector<Node> LoadAll(std::istream& input) {
    std::vector<Node> docs;

    Parser parser(input);
    while(1) {
        NodeBuilder builder;
        if(!parser.HandleNextDocument(builder))
            break;
        docs.push_back(builder.Root());
    }

    return docs;
}