YamlSyntaxTree Class
Represents a parsed YAML syntax tree.
public sealed class YamlSyntaxTreeProperties
| Name | Description |
|---|---|
| Root | Gets the root syntax node. |
| Text | Gets the original source text. |
| Tokens | Gets parsed syntax tokens. |
Tokens
YamlSyntaxTree.csMethods
| Name | Description |
|---|---|
| Parse(string, YamlSyntaxOptions?) | Parses YAML text into a syntax tree. |
| ToFullString() | Converts this syntax tree back to full text. |
| WriteTo(TextWriter) | Writes the full original text to a writer. |
Parse(string, YamlSyntaxOptions?)
YamlSyntaxTree.csParses YAML text into a syntax tree.
public static YamlSyntaxTree Parse(string yaml, YamlSyntaxOptions? options = null)Parameters
yamlstring- The YAML text.
optionsYamlSyntaxOptions?- The syntax options.
Returns
YamlSyntaxTree A parsed syntax tree.
Exceptions
ArgumentNullExceptionyamlisnull.YamlException- The YAML content is invalid.
ToFullString()
YamlSyntaxTree.csWriteTo(TextWriter)
YamlSyntaxTree.csWrites the full original text to a writer.
public void WriteTo(TextWriter writer)