12

Working with HTML, XML, and JSON

PowerShell has several commands for working with HTML, XML, and JavaScript Object Notation (JSON). These commands, combined with some of the available .NET classes, provide a rich set of tools for creating or modifying these formats.

This chapter covers the following topics:

  • HTML
  • XML commands
  • System.Xml
  • System.Xml.Linq
  • JSON

HTML

PowerShell includes the ConvertTo-Html command, which can generate HTML content.

You can create more complex HTML documents using the PSWriteHtml module available in the PowerShell Gallery, which uses a Domain-Specific Language (DSL) to describe HTML documents in PowerShell.

What is a Domain-Specific Language?

A Domain-Specific Language or DSL is a specialized language used to describe ...

Get Mastering PowerShell Scripting - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.