-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
The data-type XML element names used by ConvertTo-XmlRpcType aren't spec-compliant, in that they start with a capital letter when they should all be all-lowercase (e.g. <String> instead of <string>), and <Int32> should be <int> (base64 isn't covered by this module).
As a stopgap, you can employ the following workaround: correct the problem in a post-processing step; e.g.:
# Sample call
$result =
ConvertTo-XmlRpcMethodCall -Name LJ.XMLRPC.getevents @{
int = 42
double = 3.14
boolean = $true
date = Get-Date
array = 'one & two', 3
}
# Post-process the results to make the data-type element
# names conform to the spec.
# ('Double' -> 'double', ..., and 'Int32' -> 'int')
[regex]::Replace(
$result,
'(</?)([A-Z]\w+)',
{
param($m)
$m.Groups[1].Value + ($m.Groups[2].Value.ToLower() -replace '32$')
}
)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels