Ah, are you using PowerShell 2.0, by chance? PowerShell 3.0 added a feature called “Member Enumeration”, which would come into play on this line:
$DRSegment1 = ($node.SelectNodes("//DATASTREAM.ACDSEGMENT") | Where-Object {$_.accounted -eq "DR" -and $_.index -eq "1"}).InnerXML
If the expression in parentheses evaluates to an array, then the “.InnerXML” part of the expression tries to read an “InnerXML” property from System.Array (in PowerShell 2.0), which doesn’t exist. In PowerShell 3.0 or later, after seeing that there’s no InnerXML property and that the expression on the left of the . is a collection, it tries evaluating the InnerXML property for you on every element of the collection.
Here’s how you could make that line work in 2.0 (with some line breaks added for clarity):
$DRSegment1 = $node.SelectNodes("//DATASTREAM.ACDSEGMENT") | Where-Object {$_.accounted -eq "DR" -and $_.index -eq "1"} | Select-Object -ExpandProperty InnerXML