Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OpmlDocument

OfficeIMO.Opml

Namespace
OfficeIMO.Opml
Assembly
OfficeIMO.Opml
Source revision
ba882f6b0d07 with working tree changes
Modifiers
sealed

A source-preserving OPML 1.0/2.0 document with typed editing helpers.

Inheritance

  • object
  • OpmlDocument

Usage

Explore 5 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.

Methods

public OpmlOutline AddOutline(string text) #

Adds a top-level outline.

Parameters

text string required
public static OpmlDocument Create(OpmlVersion version = Opml20) #

Creates an empty OPML document.

Parameters

version OfficeIMO.Opml.OpmlVersion = Opml20 optional
FromOfficeDocumentModel 2 overloads
public static OpmlConversionResult<OpmlDocument> FromOfficeDocumentModel(OfficeDocumentModel model, OpmlVersion? version = null) #

Creates OPML from the recursive portion of the shared document model.

Parameters

model OfficeIMO.OfficeDocumentModel required
version OfficeIMO.Opml.OpmlVersion? = null optional
public static OpmlConversionResult<OpmlDocument> FromOfficeDocumentModel(OfficeDocumentModel model, OpmlVersion? version, OpmlConversionOptions? options) #

Creates OPML from the recursive portion of the shared document model with an explicit profile and bounded diagnostic budget.

Parameters

model OfficeIMO.OfficeDocumentModel required
version OfficeIMO.Opml.OpmlVersion? required
options OfficeIMO.Opml.OpmlConversionOptions? required
Load 2 overloads
public static OpmlDocument Load(string path, OpmlLoadOptions? options = null, CancellationToken cancellationToken = default) #

Loads an OPML file.

Parameters

path string required
options OfficeIMO.Opml.OpmlLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public static OpmlDocument Load(Stream stream, OpmlLoadOptions? options = null, CancellationToken cancellationToken = default) #

Loads OPML from a caller-owned stream without changing a seekable stream's position.

Parameters

stream System.IO.Stream required
options OfficeIMO.Opml.OpmlLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public static async Task<OpmlDocument> LoadAsync(Stream stream, OpmlLoadOptions? options = null, CancellationToken cancellationToken = default) #

Loads OPML asynchronously from a caller-owned stream.

Parameters

stream System.IO.Stream required
options OfficeIMO.Opml.OpmlLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OpmlDocument>
public static OpmlDocument Parse(string text, OpmlLoadOptions? options = null, CancellationToken cancellationToken = default) #

Parses OPML text with secure, bounded XML settings.

Parameters

text string required
options OfficeIMO.Opml.OpmlLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
Save 3 overloads
public void Save(Stream destination, OpmlSaveOptions? options = null) #

Writes OPML to a caller-owned stream and rewinds a seekable destination.

Parameters

destination System.IO.Stream required
options OfficeIMO.Opml.OpmlSaveOptions? = null optional
public void Save(OpmlSaveOptions? options = null) #

Saves to the associated path, failing when no destination is associated.

Parameters

options OfficeIMO.Opml.OpmlSaveOptions? = null optional
public void Save(string path, OpmlSaveOptions? options = null) #

Atomically saves native output and associates the successfully written path.

Parameters

path string required
options OfficeIMO.Opml.OpmlSaveOptions? = null optional
SaveAsync 3 overloads
public Task SaveAsync(Stream destination, OpmlSaveOptions? options = null, CancellationToken cancellationToken = default) #

Writes OPML asynchronously to a caller-owned stream.

Parameters

destination System.IO.Stream required
options OfficeIMO.Opml.OpmlSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task
public Task SaveAsync(OpmlSaveOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously saves to the associated path.

Parameters

options OfficeIMO.Opml.OpmlSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task
public async Task SaveAsync(string path, OpmlSaveOptions? options = null, CancellationToken cancellationToken = default) #

Atomically saves native output asynchronously and associates the successfully written path.

Parameters

path string required
options OfficeIMO.Opml.OpmlSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task
public byte[] ToBytes(OpmlSaveOptions? options = null) #

Serializes native bytes, preserving an unchanged source when requested.

Parameters

options OfficeIMO.Opml.OpmlSaveOptions? = null optional

Returns

byte[]
ToOfficeDocumentModel 3 overloads
public OpmlConversionResult<OfficeDocumentModel> ToOfficeDocumentModel(string? sourcePath = null) #

Converts this document to the shared recursive document model.

Parameters

sourcePath string? = null optional
public OpmlConversionResult<OfficeDocumentModel> ToOfficeDocumentModel(string? sourcePath, OpmlConversionOptions? options) #

Converts this document to the shared recursive document model with a source path and bounded diagnostic budget.

Parameters

sourcePath string? required
options OfficeIMO.Opml.OpmlConversionOptions? required
public OpmlConversionResult<OfficeDocumentModel> ToOfficeDocumentModel(string? sourcePath, OpmlConversionOptions? options, CancellationToken cancellationToken) #

Converts this document to the shared recursive document model with bounded diagnostics and cancellation.

Parameters

sourcePath string? required
options OfficeIMO.Opml.OpmlConversionOptions? required
cancellationToken System.Threading.CancellationToken required
public string ToOpml(OpmlSaveOptions? options = null) #

Returns OPML text, preserving the exact input while unchanged by default.

Parameters

options OfficeIMO.Opml.OpmlSaveOptions? = null optional

Returns

string
Validate 4 overloads
public OpmlValidationResult Validate() #

Validates the supported OPML profile without discarding extension content.

public OpmlValidationResult Validate(CancellationToken cancellationToken) #

Validates the supported OPML profile while observing cancellation during semantic walks.

Parameters

cancellationToken System.Threading.CancellationToken required
public OpmlValidationResult Validate(OpmlValidationOptions? options) #

Validates the supported OPML profile with a bounded diagnostic budget.

Parameters

options OfficeIMO.Opml.OpmlValidationOptions? required
public OpmlValidationResult Validate(OpmlValidationOptions? options, CancellationToken cancellationToken) #

Validates the supported OPML profile with a bounded diagnostic budget and cancellation.

Parameters

options OfficeIMO.Opml.OpmlValidationOptions? required
cancellationToken System.Threading.CancellationToken required

Properties

public string? FilePath { get; } #

Gets the associated path, or null for an in-memory document.

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 bool 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.