MarkupString.Mxp 2.31.3

dotnet add package MarkupString.Mxp --version 2.31.3
                    
NuGet\Install-Package MarkupString.Mxp -Version 2.31.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MarkupString.Mxp" Version="2.31.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MarkupString.Mxp" Version="2.31.3" />
                    
Directory.Packages.props
<PackageReference Include="MarkupString.Mxp" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MarkupString.Mxp --version 2.31.3
                    
#r "nuget: MarkupString.Mxp, 2.31.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MarkupString.Mxp@2.31.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MarkupString.Mxp&version=2.31.3
                    
Install as a Cake Addin
#tool nuget:?package=MarkupString.Mxp&version=2.31.3
                    
Install as a Cake Tool

MarkupString.Mxp

MXP for MarkupString: writes core's shared vocabulary — sounds, music, pictures, panes, gauges, status, variables, link expiry, relocation and login prompts — as MXP's own elements, and holds each to what the client said it supports.

You say a thing once; this package is how an MXP client hears it. The same text goes to a Pueblo client through MarkupString.Pueblo, to a browser through MarkupString.Html, and to a terminal, which gets a picture's description, a pane's text, and nothing for a sound.

dotnet add package MarkupString.Mxp

Usage

using MarkupString;
using MarkupString.Ansi;
using MarkupString.Html;
using MarkupString.Mxp;

var registry = MarkupRegistry.Empty.WithAnsi().WithHtml().WithMxp().WithMxpSecureLines();

var line = MarkupText.Concat([
  MarkupText.Sound("https://example.test/sounds/door.wav", volume: 80),
  MarkupText.Pane(MarkupText.Plain("North: the gate"), "map", "The Map")]);

line.Render(MarkupFormat.Mxp, registry);
// ESC[1z<SOUND door.wav V=80 U=https://example.test/sounds/><FRAME map TITLE="The Map"><DEST map>North: the gate</DEST>

These are MXP's secure elements, which a client acts on only on a line opened in secure mode, so render through a registry with WithMxpSecureLines().

Reading MXP

WithMxp() on a DecoderRegistry reads MXP from a server: line modes, open and secure tags, SEND menus, custom elements and entities. Turn it on with decoder.EnableProtocol(MxpDecoding.Protocol) once telnet negotiates it. See Decoding.

What the client supports

MXP lets a server ask which elements a client renders (<SUPPORT>), and a client that answered -image should not be sent one. Pass the answer as a predicate over the names in MxpRegistration.Elements:

var answered = new HashSet<string>(["SOUND", "MUSIC", "VAR"], StringComparer.OrdinalIgnoreCase);
var registry = MarkupRegistry.Empty.WithAnsi().WithMxp(answered.Contains).WithMxpSecureLines();

An element the client refused is written as a format without MXP writes it: nothing for a sound, the description for a picture, the text in the main window for a pane. With no predicate every element is written. Asking belongs to the telnet layer, and the answer to one connection.

For a client that refuses IMAGE but renders terminal graphics, also configure WithAnsiOutput(new AnsiOutputOptions(depth, features) { Pictures = source }). Laid-out image rows then use the enabled Sixel, iTerm2, Kitty or block-art renderer while links and other supported elements remain MXP. Without pixels or an enabled graphics method, the picture keeps its text art. A client that supports IMAGE continues receiving MXP images.

Elements

Factory Written as
MarkupText.Sound(source, volume, repeats) <SOUND file V= L= U=>
MarkupText.Music(source, volume, repeats, continues) <MUSIC file V= L= C=1 U=>
MarkupText.StopSound(channel) <SOUND Off>, <MUSIC Off>
MarkupText.Image(source, description, width, height, align) <IMAGE file URL= W= H= ALIGN=>
a laid-out Figure <IMAGE file URL=> on its first row, its other cells blank
MarkupText.Pane(content, name, title) <FRAME name TITLE=><DEST name>content</DEST>
MarkupText.ExpireLinks(group) <EXPIRE group>
MarkupText.Relocate(host, port, quiet) <RELOCATE host port QUIET>
MarkupText.LoginPrompt(field) <USER>, <PASSWORD>
MarkupText.Variable(content, name) <VAR name>content</VAR>
MarkupText.Gauge(content, variable, maximum, caption, color) <GAUGE variable MAX= CAPTION= COLOR=>
MarkupText.Status(content, variable, maximum, caption) <STAT variable MAX= CAPTION=>

An absolute address is split into the file and the directory MXP downloads it from (U=, URL=). Syntax is from the MXP specification.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.31.3 0 11/15/2026
2.31.2 342 11/15/2026
2.31.1 392 11/15/2026
2.31.0 2,201 11/13/2026
2.30.0 590 11/12/2026
2.29.1 85 11/11/2026
2.29.0 72 11/11/2026
2.28.1 92 11/11/2026
2.28.0 2,754 11/10/2026
2.27.3 968 11/9/2026
2.27.2 291 11/7/2026
2.27.1 138 11/7/2026
2.27.0 104 11/7/2026
2.26.0 89 11/7/2026
2.25.0 1,313 11/3/2026
2.24.2 1,458 10/29/2026
2.24.1 106 10/29/2026
2.24.0 350 10/28/2026
2.23.1 794 10/27/2026
2.23.0 1,033 10/24/2026
Loading failed