yq/pkg/yqlib/doc/operators/headers/load.md

33 lines
625 B
Markdown
Raw Normal View History

2021-11-16 04:29:16 +00:00
# Load
The load operators allows you to load in content from another file.
2021-11-16 04:29:16 +00:00
Note that you can use string operators like `+` and `sub` to modify the value in the yaml file to a path that exists in your system.
You can load files of the following supported types:
|Format | Load Operator |
| --- | --- |
| Yaml | load |
| XML | load_xml |
| Properties | load_props |
| Plain String | load_str |
2021-11-16 04:29:16 +00:00
Lets say there is a file `../../examples/thing.yml`:
```yaml
a: apple is included
b: cool
```
and a file `small.xml`:
```xml
<this>is some xml</this>
```
and `small.properties`:
```properties
this.is = a properties file
```