API Reference
OpmlDocument
A source-preserving OPML 1.0/2.0 document with typed editing helpers.
Inheritance
- Object
- OpmlDocument
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method OpmlDocument.Create
- Method OpmlDocument.FromOfficeDocumentModel
- Method OpmlDocument.FromOfficeDocumentModel
- Method OpmlDocument.Load
- Method OpmlDocument.Load
- Method OpmlDocument.LoadAsync
- Method OpmlDocument.Parse
Methods
public OpmlOutline AddOutline(String text) #OpmlOutlineAdds a top-level outline.
Parameters
- text System.String
public static OpmlDocument Create(OpmlVersion version = Opml20) #OpmlDocumentCreates an empty OPML document.
Parameters
- version OfficeIMO.Opml.OpmlVersion = Opml20
public static OpmlConversionResult<OpmlDocument> FromOfficeDocumentModel(OfficeDocumentModel model, Nullable<OpmlVersion> version = null) #OpmlConversionResult<OpmlDocument>Creates OPML from the recursive portion of the shared document model.
Parameters
- model OfficeIMO.OfficeDocumentModel
- version System.Nullable{OfficeIMO.Opml.OpmlVersion} = null
public static OpmlConversionResult<OpmlDocument> FromOfficeDocumentModel(OfficeDocumentModel model, Nullable<OpmlVersion> version, OpmlConversionOptions options) #OpmlConversionResult<OpmlDocument>Creates OPML from the recursive portion of the shared document model with an explicit profile and bounded diagnostic budget.
Parameters
- model OfficeIMO.OfficeDocumentModel
- version System.Nullable{OfficeIMO.Opml.OpmlVersion}
- options OfficeIMO.Opml.OpmlConversionOptions
public static OpmlDocument Load(String path, OpmlReadOptions options = null, CancellationToken cancellationToken = default) #OpmlDocumentLoads an OPML file.
Parameters
- path System.String
- options OfficeIMO.Opml.OpmlReadOptions = null
- cancellationToken System.Threading.CancellationToken = default
public static OpmlDocument Load(Stream stream, OpmlReadOptions options = null, CancellationToken cancellationToken = default) #OpmlDocumentLoads OPML from a caller-owned stream without changing a seekable stream's position.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Opml.OpmlReadOptions = null
- cancellationToken System.Threading.CancellationToken = default
public static async Task<OpmlDocument> LoadAsync(Stream stream, OpmlReadOptions options = null, CancellationToken cancellationToken = default) #Task<OpmlDocument>Loads OPML asynchronously from a caller-owned stream.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Opml.OpmlReadOptions = null
- cancellationToken System.Threading.CancellationToken = default
public static OpmlDocument Parse(String text, OpmlReadOptions options = null, CancellationToken cancellationToken = default) #OpmlDocumentParses OPML text with secure, bounded XML settings.
Parameters
- text System.String
- options OfficeIMO.Opml.OpmlReadOptions = null
- cancellationToken System.Threading.CancellationToken = default
public Void Save(String path, OpmlWriteOptions options = null) #VoidSaves OPML through an atomic same-directory file commit.
Parameters
- path System.String
- options OfficeIMO.Opml.OpmlWriteOptions = null
public Task SaveAsync(String path, OpmlWriteOptions options = null, CancellationToken cancellationToken = default) #TaskSaves OPML asynchronously through an atomic same-directory file commit.
Parameters
- path System.String
- options OfficeIMO.Opml.OpmlWriteOptions = null
- cancellationToken System.Threading.CancellationToken = default
public OpmlConversionResult<OfficeDocumentModel> ToOfficeDocumentModel(String sourcePath = null) #OpmlConversionResult<OfficeDocumentModel>Converts this document to the shared recursive document model.
Parameters
- sourcePath System.String = null
public OpmlConversionResult<OfficeDocumentModel> ToOfficeDocumentModel(String sourcePath, OpmlConversionOptions options) #OpmlConversionResult<OfficeDocumentModel>Converts this document to the shared recursive document model with a source path and bounded diagnostic budget.
Parameters
- sourcePath System.String
- options OfficeIMO.Opml.OpmlConversionOptions
public OpmlConversionResult<OfficeDocumentModel> ToOfficeDocumentModel(String sourcePath, OpmlConversionOptions options, CancellationToken cancellationToken) #OpmlConversionResult<OfficeDocumentModel>Converts this document to the shared recursive document model with bounded diagnostics and cancellation.
Parameters
- sourcePath System.String
- options OfficeIMO.Opml.OpmlConversionOptions
- cancellationToken System.Threading.CancellationToken
public String ToOpml(OpmlWriteOptions options = null) #StringReturns OPML text, preserving the exact input while unchanged by default.
Parameters
- options OfficeIMO.Opml.OpmlWriteOptions = null
public OpmlValidationResult Validate() #OpmlValidationResultValidates the supported OPML profile without discarding extension content.
public OpmlValidationResult Validate(CancellationToken cancellationToken) #OpmlValidationResultValidates the supported OPML profile while observing cancellation during semantic walks.
Parameters
- cancellationToken System.Threading.CancellationToken
public OpmlValidationResult Validate(OpmlValidationOptions options) #OpmlValidationResultValidates the supported OPML profile with a bounded diagnostic budget.
Parameters
- options OfficeIMO.Opml.OpmlValidationOptions
public OpmlValidationResult Validate(OpmlValidationOptions options, CancellationToken cancellationToken) #OpmlValidationResultValidates the supported OPML profile with a bounded diagnostic budget and cancellation.
Parameters
- options OfficeIMO.Opml.OpmlValidationOptions
- cancellationToken System.Threading.CancellationToken
public Void Write(Stream destination, OpmlWriteOptions options = null) #VoidWrites OPML to a caller-owned stream and rewinds a seekable destination.
Parameters
- destination System.IO.Stream
- options OfficeIMO.Opml.OpmlWriteOptions = null
public Task WriteAsync(Stream destination, OpmlWriteOptions options = null, CancellationToken cancellationToken = default) #TaskWrites OPML asynchronously to a caller-owned stream.
Parameters
- destination System.IO.Stream
- options OfficeIMO.Opml.OpmlWriteOptions = null
- cancellationToken System.Threading.CancellationToken = default
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public String DeclaredVersion { get; set; } #The declared OPML version text, including a preserved 1.1 declaration.
public OpmlVersion Version { get; } #The effective supported OPML profile.
public Boolean IsModified { get; } #True after a typed or extension mutation.
public OpmlHead Head { get; } #Typed standard head values.
public IReadOnlyList<OpmlOutline> Outlines { get; } #Top-level outlines in document order.
public XDocument Xml { get; } #Underlying XML for advanced lossless extension inspection.