• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Export-Clixml output is inconvenient for viewing

  • Thread starter =?Utf-8?B?Um9tYW4gS3V6bWlu?=
  • Start date
?

=?Utf-8?B?Um9tYW4gS3V6bWlu?=

#1
Export-Clixml writes all the data as the only line of text (well, except line
breaks in the data). It is inconvenient for viewing of the output content. At
the same time I expect lots of occasions when it could be useful to view or
even modify output Clixml files using, say, a text editor.

Perhaps I miss something and “no-line-breaks†is vitally important for
Clixml format. If it is not then my suggestion is to add parameter(s) for
Export-Clixml formatting customization (at least line breaks at XML element
ends). And, as for me, I would prefer line breaks enabled by default.

--
Thanks,
Roman

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/communitie...d25fd0&dg=microsoft.public.windows.powershell
 

My Computer

J

Jeffrey Snover [MSFT]

#2

My Computer

K

Karl Prosser

#3
i think that a format-XML cmdlet would be a good addition rather than
changing this..

if you want this string to be visible and readible in a nice manner you can
do a few things.. load it back in type cast it as [xml] which puts it into
an XmlDocument which has some methods to get the text or save if it a format
which is better for humans to read
another way if you are just wanting to view it interactively, is to use my
powershell analyzer.. anything that is XML will show up on the XML tab in a
colored, formated, and interactivce way (you can expand and contract
nodes).. www.karlprosser.com/coder for more details.
 

My Computer

L

Lee Holmes [MSFT]

#4
Scott Hanselman and Keith Hill also had good "XML Pretty Print" scripts:

http://keithhill.spaces.live.com/blog/cns!5A8D2641E0963A97!618.entry
http://keithhill.spaces.live.com/blog/cns!5A8D2641E0963A97!620.entry
http://www.hanselman.com/blog/AnXmlTidyInPowerShellOrFormattingXmlWithIndentingWithPowerShell.aspx

--
Lee Holmes [MSFT]
Windows PowerShell Development
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.


"Karl Prosser" <monadzWITHOUTTHIS@gmail.com> wrote in message
news:e4mFKGAzGHA.1256@TK2MSFTNGP04.phx.gbl...
>i think that a format-XML cmdlet would be a good addition rather than
>changing this..
>
> if you want this string to be visible and readible in a nice manner you
> can do a few things.. load it back in type cast it as [xml] which puts it
> into an XmlDocument which has some methods to get the text or save if it a
> format which is better for humans to read
> another way if you are just wanting to view it interactively, is to use my
> powershell analyzer.. anything that is XML will show up on the XML tab in
> a colored, formated, and interactivce way (you can expand and contract
> nodes).. www.karlprosser.com/coder for more details.
>
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)