Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Get-OfficeMarkdownNode

Module
PSWriteOffice
Inputs
OfficeIMO.Markdown.MarkdownDocument System.String
Outputs
System.Management.Automation.PSObject OfficeIMO.Markdown.MarkdownObject

Gets the OfficeIMO.Markdown object tree from Markdown content.

Syntax

Get-OfficeMarkdownNode
[-CaseSensitive]
[-Document <MarkdownDocument>]
[-MaxDepth <Int32>]
[-NodeType <String>]
[-Raw]
[<CommonParameters>]
#
Parameter set: Document
Get-OfficeMarkdownNode
[-CaseSensitive]
[-MaxDepth <Int32>]
[-NodeType <String>]
[-Options <Object[]>]
[-Path] <String>
[-Raw]
[<CommonParameters>]
#
Parameter set: Path
Get-OfficeMarkdownNode
[-CaseSensitive]
-LiteralPath <String>
[-MaxDepth <Int32>]
[-NodeType <String>]
[-Options <Object[]>]
[-Raw]
[<CommonParameters>]
#
Parameter set: LiteralPath
Get-OfficeMarkdownNode
[-CaseSensitive]
[-MaxDepth <Int32>]
[-NodeType <String>]
[-Options <Object[]>]
[-Raw]
-Text <String>
[<CommonParameters>]
#
Parameter set: Text

Description

Returns PowerShell-friendly node records by default. Use -Raw to emit the underlying OfficeIMO nodes.

Examples

Inspect the Markdown object tree.

Get-OfficeMarkdownNode -Text "# Report`n`n## Summary"

Parses Markdown text and returns the document, block, and inline object tree.

Inspect a parsed document.

Open-OfficeMarkdown -Path .\README.md | Get-OfficeMarkdownNode -NodeType '*Table*'

Returns matching nodes from an existing Markdown document.

Parameters

-CaseSensitive SwitchParameter optional
Use case-sensitive matching for node type filters.
-Document MarkdownDocument optionalpipeline: True (ByValue)sets: Document
Caller-owned document; omission uses the enclosing Markdown document.
-MaxDepth Int32 optional
Maximum traversal depth. Zero returns only the document root.
-NodeType String optional
Optional wildcard pattern matched against node type names.
-Raw SwitchParameter optional
Emit raw OfficeIMO.Markdown node objects instead of PowerShell-friendly records.
-Options Object[] optionalsets: Path, LiteralPath, Text
Native reader options and optional native-property hashtable overrides.
-Path String requiredposition: 0pipeline: True (ByValue)sets: Path
Input file with FileSystem wildcard expansion.
-LiteralPath String requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath
Literal input file, including a FileInfo pipeline.
-Text String requiredsets: Text
Markdown source text.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.