Class
RtfSyntaxTree
OfficeIMO.Rtf.Syntax
Loss-preserving RTF syntax tree produced from tokens.
Inheritance
- object
- RtfSyntaxTree
Usage
Explore 6 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 4
- Property RtfLosslessEditor.SyntaxTree
- Property RtfReadResult.SyntaxTree
- Method RtfSyntaxParser.Parse
- Method RtfSyntaxTree.Parse
Accepted by parameters 2
- Constructor RtfLosslessEditor.RtfLosslessEditor
- Method RtfSyntaxWriter.Write
Methods
public RtfLosslessEditor EditLossless() #Creates an editor for targeted syntax-preserving changes.
Returns
RtfLosslessEditorParse 3 overloads
public static RtfSyntaxTree Parse(string rtf) #Parses RTF content into a syntax tree.
Parameters
- rtf string
Returns
RtfSyntaxTreepublic static RtfSyntaxTree Parse(string rtf, int maxDepth) #Parses RTF content into a syntax tree while limiting nested group depth.
Parameters
- rtf string
- maxDepth int
Returns
RtfSyntaxTreepublic static RtfSyntaxTree Parse(string rtf, RtfLoadOptions? options, CancellationToken cancellationToken = default) #Parses RTF content using configured resource limits and cancellation.
Parameters
- rtf string
- options OfficeIMO.Rtf.RtfLoadOptions?
- cancellationToken System.Threading.CancellationToken = default
Returns
RtfSyntaxTreepublic string ToRtf() #Serializes the original syntax tree without semantic normalization.
Returns
string