-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
41 lines (29 loc) · 722 Bytes
/
main.cpp
File metadata and controls
41 lines (29 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include "MRml.h"
using namespace Rad;
int main(void)
{
rml_document rdoc_read, rdoc_save;
rdoc_read.open("read.rml");
// single-line
{
rml_node * node = rdoc_read.first_node("single-line");
const char * value = node->value();
rdoc_save.append("single-line", value);
}
// multi-line
{
rml_node * node = rdoc_read.first_node("multi-line");
const char * value = node->value();
rdoc_save.append("multi-line", value);
}
// sub-node
{
rml_node * node = rdoc_read.first_node("sub-node");
rml_node * child = node->first_node("child");
const char * value = child->value();
rdoc_save.append("sub-node", "")->append("child", value);
}
rdoc_save.save("save.rml");
return 0;
}