Write-PodeXmlResponse

SYNOPSIS

Writes XML data to the Response.

SYNTAX

Value (Default)

Write-PodeXmlResponse -Value <Object> [-StatusCode <Int32>] [<CommonParameters>]

File

Write-PodeXmlResponse -Path <String> [-StatusCode <Int32>] [<CommonParameters>]

DESCRIPTION

Writes XML data to the Response, setting the content type accordingly.

EXAMPLES

EXAMPLE 1

<name>Rick</name></root>'

EXAMPLE 2

Write-PodeXmlResponse -Value @{ Name = 'Rick' } -StatusCode 201

EXAMPLE 3

Write-PodeXmlResponse -Path 'E:/Files/Names.xml'

PARAMETERS

-Path

The path to an XML file.

Type: String
Parameter Sets: File
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StatusCode

The status code to set against the response.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 200
Accept pipeline input: False
Accept wildcard characters: False

-Value

A String, PSObject, or HashTable value.

Type: Object
Parameter Sets: Value
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES