10000 Export-FormatData XML output · Issue #6699 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Export-FormatData XML output #6699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iSazonov opened this issue Apr 22, 2018 · 3 comments
Closed

Export-FormatData XML output #6699

iSazonov opened this issue Apr 22, 2018 · 3 comments
Labels
Issue-Discussion the issue may not have a clear classification yet. The issue may generate an RFC or may be reclassif WG-Cmdlets-Utility cmdlets in the Microsoft.PowerShell.Utility module

Comments

@iSazonov
Copy link
Collaborator

In #6691 we made that Export-FormatData returns pretty-printing XML output by default as requested in #6681.

Users may need a different output:
-AsXML - output [xml] object
-AsXMLString or -AsString - output compact XML string without formatting.
-Encoding - set encoding of output file .

And perhaps add option to output to pipe not file and -PassThru.

@iSazonov iSazonov added Issue-Discussion the issue may not have a clear classification yet. The issue may generate an RFC or may be reclassif WG-Cmdlets-Utility cmdlets in the Microsoft.PowerShell.Utility module labels Apr 22, 2018
@BrucePay
Copy link
Collaborator

Export commands don't typically return data. Perhaps Get-FormatData would be better for returning an [xml] object? Just curious - why the request for compact XML ? Is the formatted stuff that much bigger? Adding -encoding to match, for example export-csv, makes sense.

@iSazonov
Copy link
Collaborator Author
9078 iSazonov commented Apr 23, 2018

why the request for compact XML

@markekraus requested this in #6691.

@markekraus
Copy link
Contributor

For me, it's not so much about having a compression/compact option, but having a way to revert behavior. I'm not a big fan of changing output behavior in such a way that increases resource consumption without a way to revert the behavior if change was not fixing a broken behavior and implementing the previous behavior is simple enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Discussion the issue may not have a clear classification yet. The issue may generate an RFC or may be reclassif WG-Cmdlets-Utility cmdlets in the Microsoft.PowerShell.Utility module
Projects
None yet
Development

No branches or pull requests

3 participants
0