Types/OpenPackage.Part/ReadXml.ps1
|
<# .SYNOPSIS Reads Part Content XML .DESCRIPTION Reads an OpenPackage Part's Content as XML #> [Reflection.AssemblyMetadata( 'FilePattern', '\.(?>svg|ps1xml|xml|xhtml|.+proj|nuspec)$' )] [Reflection.AssemblyMetadata( 'ContentTypePattern', '[/\+]xml?$' )] param( # An optional input object # If provided, content will be read from this object. # If not provided, content will be read from this part. [Alias('Input')] [PSObject]$InputObject = $null, # Any options used to read the data. [Alias('Options')] [Collections.IDictionary]$Option = [Ordered]@{} ) if (-not $this.ReadText) { return } $partText = $this.ReadText($InputObject, $Option) return [xml]$partText |