< Back
Write-PodeXmlResponse
Post
NAME Write-PodeXmlResponse
SYNOPSIS
Writes XML data to the Response.
SYNTAX
Write-PodeXmlResponse -Value <Object> [-StatusCode <Int32>] [<CommonParameters>]
Write-PodeXmlResponse -Path <String> [-StatusCode <Int32>] [<CommonParameters>]
DESCRIPTION
Writes XML data to the Response, setting the content type accordingly.
PARAMETERS
-Value <Object>
A String, PSObject, or HashTable value.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
The path to an XML file.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-StatusCode <Int32>
The status code to set against the response.
Required? false
Position? named
Default value 200
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
Write-PodeXmlResponse -Value '<root><name>Rick</name></root>'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Write-PodeXmlResponse -Value @{ Name = 'Rick' } -StatusCode 201
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Write-PodeXmlResponse -Path 'E:/Files/Names.xml'
RELATED LINKS
SYNOPSIS
Writes XML data to the Response.
SYNTAX
Write-PodeXmlResponse -Value <Object> [-StatusCode <Int32>] [<CommonParameters>]
Write-PodeXmlResponse -Path <String> [-StatusCode <Int32>] [<CommonParameters>]
DESCRIPTION
Writes XML data to the Response, setting the content type accordingly.
PARAMETERS
-Value <Object>
A String, PSObject, or HashTable value.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Path <String>
The path to an XML file.
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-StatusCode <Int32>
The status code to set against the response.
Required? false
Position? named
Default value 200
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
Write-PodeXmlResponse -Value '<root><name>Rick</name></root>'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Write-PodeXmlResponse -Value @{ Name = 'Rick' } -StatusCode 201
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Write-PodeXmlResponse -Path 'E:/Files/Names.xml'
RELATED LINKS