Hi,
I'm developing my first cmdlet and coming up against a problem which isn't really anything to do with Powershell per se but nevertheless hopefully someone here can help.
I have an XML document that looks something like this:
Some summary
Publisher B
My first book
Author A
As you can it has 2 books in it but they both have different properties. i.e. There is no known schema here. I've been trying to use LINQ To XML to convert this into something that WriteObject() will be able to output to the pipeline. So basically I want to output 2 rows of data, 1 for each book. Can anyone come up with a way of doing that?
I fear its not possible because I don't know beforehand what properties each book will have, there isn't even a finite list of properties that each book MIGHT have so C# being a staticly typed language can't handle it.
Any help would be much appreciated.
-jamie