尝试以解析简单文本文件的方式解析 XML 文件。在我看过的大多数教程中,他们讨论了元素等。有没有办法对它进行排序并找到关键字等,例如,如果我想找到 UUID 部分或任何包含“CLOUDATLAS_FTR-1_S_EN”的行-" 当您打开一个 XML 文件时,这究竟是如何变化的?
<?xml version="1.0" encoding="UTF-8" standalone="no" ?><DCinemaSecurityMessage xmlns="http://www.smpte-ra.org/schemas/430-3/2006/ETM" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
<!-- Generated by Waimea 0.4.28l (wlib 0.9.53) -->
<AuthenticatedPublic Id="ID_AuthenticatedPublic">
<MessageId>urn:uuid:0bb31789-de90-4e17-859b-dc771ff97280</MessageId>
<MessageType>http://www.smpte-ra.org/430-1/2006/KDM#kdm-key-type</MessageType>
<AnnotationText>CLOUDATLAS_FTR-1_S_EN-EN_51_PRE_2K_20120830_ADC_OV ~ KDM for SM.Dolby256-DSP100-000004d8</AnnotationText>
<IssueDate>2012-09-28T17:39:53+00:00</IssueDate>
<Signer>
<dsig:X509IssuerName>dnQualifier=G4c6KCUZh7AzcyJnMCXbf9GAfAA=,CN=.cc-wm-2336-000020,OU=.cc-ra-1a.s430-2.ca.cinecert.com,O=.ca.cinecert.com</dsig:X509IssuerName>
<dsig:X509SerialNumber>61638</dsig:X509SerialNumber>
</Signer>
<RequiredExtensions>
<KDMRequiredExtensions xmlns="http://www.smpte-ra.org/schemas/430-1/2006/KDM">
<Recipient>
<X509IssuerSerial>
<dsig:X509IssuerName>dnQualifier=GCx2vAlHzkdwGCcO8/RwVow0PAo=,CN=.Cinea.CA.1,O=DC256.Cinea.Com,OU=CA1.DC256.Cinea.Com</dsig:X509IssuerName>
<dsig:X509SerialNumber>1804</dsig:X509SerialNumber>
</X509IssuerSerial>
<X509SubjectName>dnQualifier=fz7SARXDJebOMN2832Kl0EfA4sg=,CN=SM.Dolby256-DSP100-000004d8,O=DC256.Cinea.Com,OU=DolbyShowPlayer</X509SubjectName>
</Recipient>
<CompositionPlaylistId>urn:uuid:194c16b9-f8ea-4d3c-9cc2-f9db651da636</CompositionPlaylistId>
<ContentTitleText>CLOUDATLAS_FTR-1_S_EN-EN_51_PRE_2K_20120830_ADC_OV</ContentTitleText>
<ContentKeysNotValidBefore>2012-09-28T07:00:00+00:00</ContentKeysNotValidBefore>
<ContentKeysNotValidAfter>2012-11-16T05:59:00+00:00</ContentKeysNotValidAfter>
<AuthorizedDeviceInfo>
<DeviceListIdentifier>urn:uuid:12476d40-2f3f-4166-9013-fd6bfebf2b8a</DeviceListIdentifier>
<DeviceList>
<CertificateThumbprint>2jmj7l5rSw0yVb/vlWAYkK/YBwk=</CertificateThumbprint>
</DeviceList>
</AuthorizedDeviceInfo>
<KeyIdList>
<TypedKeyId>
<KeyType>MDIK</KeyType>
<KeyId>urn:uuid:5526f829-2e64-47db-acc4-7b3c092b4ebe</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDAK</KeyType>
<KeyId>urn:uuid:d87ed6e1-2b26-44c3-b338-fb82a65aaf5c</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDIK</KeyType>
<KeyId>urn:uuid:9d922467-7656-405e-87c1-c1e4957d3afe</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDAK</KeyType>
<KeyId>urn:uuid:8bf4778f-3582-4cfa-bb32-b35b699f0598</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDIK</KeyType>
<KeyId>urn:uuid:6316d846-26dc-4538-9994-8467ed76dea4</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDAK</KeyType>
<KeyId>urn:uuid:810b65bf-73aa-4728-9b1c-fb3a90df188d</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDIK</KeyType>
<KeyId>urn:uuid:2fe19612-b9a3-4819-ab1d-ddd9ac006319</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDAK</KeyType>
<KeyId>urn:uuid:1b703c28-d578-46c6-bca4-04c2741ad27e</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDIK</KeyType>
<KeyId>urn:uuid:1b6d67b6-e0eb-4715-97d6-11340aa3615a</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDAK</KeyType>
<KeyId>urn:uuid:73041ad7-47e3-459c-a554-2663e44916db</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDIK</KeyType>
<KeyId>urn:uuid:d57cfd00-6787-4566-8bf0-09374103953a</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDAK</KeyType>
<KeyId>urn:uuid:9caa3533-2395-4f53-8b4c-b8c801ee595c</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDIK</KeyType>
<KeyId>urn:uuid:db40255f-9ea2-47ce-a5ab-c825fd6a466d</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDAK</KeyType>
<KeyId>urn:uuid:06bc0f21-ae6b-43cd-8c7d-e8fbc0347d50</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDIK</KeyType>
<KeyId>urn:uuid:64f9da4f-91cf-4b2a-bb13-d95315351475</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDAK</KeyType>
<KeyId>urn:uuid:969330d5-fa3b-479a-b901-43d406d16400</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDIK</KeyType>
<KeyId>urn:uuid:c3aadc36-a395-4c34-a7ac-e1ec1c69df66</KeyId>
</TypedKeyId>
<TypedKeyId>
<KeyType>MDAK</KeyType>
<KeyId>urn:uuid:19746f06-1c00-4575-9ba0-7b13b6058a0d</KeyId>
</TypedKeyId>
</KeyIdList>
</KDMRequiredExtensions>
</RequiredExtensions>
<NonCriticalExtensions/>
</AuthenticatedPublic>
<AuthenticatedPrivate Id="ID_AuthenticatedPrivate"><enc:EncryptedKey xmlns:enc="http://www.w3.org/2001/04/xmlenc#">
<enc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p">
<ds:DigestMethod xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
</enc:EncryptionMethod>
<enc:CipherData>