-
Notifications
You must be signed in to change notification settings - Fork 0
ConvertTo XmlElements
Serializes complex content into XML elements.
ConvertTo-XmlElements [[-InputObject] <Object>] [-Depth <Int32>] [-SkipRoot]
[-ProgressAction <ActionPreference>] [<CommonParameters>]
{{ Fill in the Description }}
ConvertTo-XmlElements @{html=@{body=@{p='Some text.'}}} -SkipRoot
<html> <body> <p>Some text.</p> </body> </html>
[pscustomobject]@{UserName='zaphodb';Computer='eddie'} |ConvertTo-XmlElements
<PSCustomObject> <UserName>zaphodb</UserName> <Computer>eddie</Computer> </PSCustomObject>
'{"item": {"name": "Test", "id": 1 } }' |ConvertFrom-Json |ConvertTo-XmlElements -SkipRoot
<item> <name>Test</name> <id>1</id> </item>
A hash or XML element or other object to be serialized as XML elements.
Each hash value or object property value may itself be a hash or object or XML element.
Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseSpecifies how many levels of contained objects are included in the JSON representation. The value can be any number from 0 to 100. The default value is 2. ConvertTo-Json emits a warning if the number of levels in an input object exceeds this number.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: 3
Accept pipeline input: False
Accept wildcard characters: FalseDo not wrap the input in a root element.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.