如何使用 plutil 从 xml 文件中提取数据?

how to extract data from an xml file using plutil?

这是我的file.xml

<key>FairPlayKeyData</key>
    <data>
    LS0tLS1CRUdJTiBD....S0tCg==
    </data>

我希望输出为:LS0tLS1CRUdJTiBD....S0tCg==

我试试:plutil -key FairPlayKeyData file.xml

但输出:unrecognized option: -key

使用-extract选项:

-extract keypath fmt
outputs the value at 'keypath' in the property list as a new plist of type 'fmt'

fmt is one of: xml1 binary1 json raw

an additional "-expect type" option can be provided to test that the value at the specified keypath is of the specified "type", which can be one of: bool, integer, float, string, date, data, dictionary, array

plutil -extract FairPlayKeyData raw file.xml