
# Export all <Website> elements from websites.xml to a CSV file.

$doc = [xml] (Get-Content -Path "h:\demo\wps\b_xml\websites.en.xml")
$doc.Websites.Website | Export-Csv  h:\demo\wps\b_xml\websites.en.csv


# Create a script that calculate how much longer it takes to create an XmlDocument object from an large XML file compared to just reading the same file as it would be normal text

$a = measure-command { Get-Content h:\demo\wps\b_xml\pricelist.xml }
$b = measure-command { [XML] (Get-Content h:\demo\wps\b_xml\pricelist.xml) }
$b.TotalMilliseconds / $a.TotalMilliseconds

# Create a script that calculate how much longer it properly import an CSV file and create pipeline objects compared to just reading the same file as it would be normal text

$a = measure-command { Get-Content h:\demo\wps\b_xml\pricelist.csv }
$b = measure-command { Import-Csv h:\demo\wps\b_xml\pricelist.csv }
$b.TotalMilliseconds / $a.TotalMilliseconds

# xxx

$doc = [XML] (Get-Content h:\demo\wps\b_xml\pricelist.xml)
$doc.Preisliste.Produkt | Export-Csv  h:\demo\wps\b_xml\pricelist.csv