ConvertFrom PodeXml - mdaneri/Pode GitHub Wiki
external help file: Pode-help.xml Module Name: Pode online version: PodeType: Utilities schema: 2.0.0
Converts an XML node to a PowerShell hashtable.
ConvertFrom-PodeXml [-node] <XmlNode> [-Prefix <String>] [-ShowDocElement] [-KeepAttributes]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
The ConvertFrom-PodeXml function converts an XML node, including all its child nodes and attributes, into an ordered hashtable. This is useful for manipulating XML data in a more PowerShell-centric way.
$node = [xml](Get-Content 'path\to\file.xml').DocumentElement
ConvertFrom-PodeXml -node $node
Converts the XML document's root node to a hashtable.
If set, the function keeps the attributes of the XML nodes in the resulting hashtable.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThe XML node to convert. This parameter takes an XML node and processes it, along with its child nodes and attributes.
Type: XmlNode
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseA string prefix used to indicate an attribute. Default is an empty string.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIndicates whether to show the document element. Default is false.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This cmdlet is useful for transforming XML data into a structure that's easier to manipulate in PowerShell scripts.