question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OCGV: Out-ConsoleGridView does not accept XML data

See original GitHub issue

While manipulating XML data and testing Out-ConsoleGridView (Powershell 7.0.0 on Windows 10.0.19603), I noticed that the cmdlet appears to demand data of a certain datatype. For testing, a sample XML file can be found here.

[xml]$xml = Get-Content '.\sample.xml'

Tabular output from $xml can be viewed in the terminal

$xml.catalog.book

Output

id           : bk101
author       : Gambardella, Matthew
title        : XML Developer's Guide
genre        : Computer
price        : 44.95
publish_date : 2000-10-01
description  : An in-depth look at creating applications 
                     with XML.

id           : bk102
...

Piping to Out-GridView produces expected output

$xml.catalog.book | Out-GridView

out-gridview

However, piping to Out-ConsoleGridView produces an error

$xml.catalog.book | Out-ConsoleGridView

out-consolegridview The BaseType of $xml.catalog.book is System.Array

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TylerLeonhardtcommented, Aug 28, 2020

gentle ping on this

0reactions
tigcommented, Aug 24, 2022

@andschwa please prefix title with "OCGV: ".

Read more comments on GitHub >

github_iconTop Results From Across the Web

PowerShell 7 ConsoleGridView
Let's have some fun and learn about the PowerShell 7 command Out-ConsoleGridView. All the benefits of Out-Gridview but in a console setting.
Read more >
Extract XML data and Save as XML file - powershell
I'm using Invoke-WebRequest to save the file using -Outfile , but I don't want all the soap envelope data. From the sample data...
Read more >
Can't open file that contains custom XML elements which ...
Describes an issue in which a particular custom XML markup implementation is removed in Word 2007, Word 2010 and Word 2013.
Read more >
Work With XML Data in PowerShell - YouTube
Your browser can't play this video. Learn more.
Read more >
Unable to publish XML data to printer using PowerShell
This script works for HP, just not Xerox. No errors are returned, and I am able to publish the XML if I manually...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found