Skip to content

Export-FormatData XML output #6699

Closed
Closed

Description

@iSazonov

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.

Activity

  1. BrucePay commented on Apr 22, 2018

    @BrucePay
    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.

  2. iSazonov commented on Apr 23, 2018

    @iSazonov
    CollaboratorAuthor

    why the request for compact XML

    Mark Kraus (@markekraus) requested this in #6691.

  3. markekraus commented on Apr 23, 2018

    @markekraus
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Discussionthe issue may not have a clear classification yet. The issue may generate an RFC or may be reclassifWG-Cmdletsgeneral cmdlet issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions