Bonjour,

j'ai quelque problème afin d'extraire une chaine de caractère d'un fichier XML

voici tout d'abord le fichier XML

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?xml version="1.0" encoding="UTF-8"?>
<PackingList xmlns="http://www.digicine.com/PROTO-ASDCP-PKL-20040311#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <Id>urn:uuid:4acd1ef7-0787-e211-9f69-0025900cf57e</Id>
 <AnnotationText>LA-RELIGIEUSE_FTR_F_FR-XX_51_2K_PAC_20130307_TIT_2D</AnnotationText>
 <IssueDate>2013-03-07T10:18:25+01:00</IssueDate>
 <Issuer>OpenCube Technologies</Issuer>
 <Creator>MXFTk DCPCreator</Creator>
 <AssetList>
  <Asset>
   <Id>urn:uuid:560859b2-0787-e211-9f66-0025900cf57e</Id>
   <AnnotationText>LA-RELIGIEUSE_FTR_F_FR-SME_51_2K_PAC_20130307_TIT_2D</AnnotationText>
   <Hash>YtF3M5mjqiGz9YviH4eSsve1iYI=</Hash>
   <Size>19138</Size>
   <Type>text/xml;asdcpKind=CPL</Type>
   <OriginalFileName>CPL_LA-RELIGIEUSE_FTR_F_FR-SME_51_2K_PAC_20130307_TIT_2D_560859b2-0787-e211-9f66-0025900cf57e.xml</OriginalFileName>
  </Asset>
 </AssetList>
je l'ai bien sur raccourci afin de faciliter la lecture .

Mon objectif est d'extraire la valeur du node hash c'est a dire
Code : Sélectionner tout - Visualiser dans une fenêtre à part
YtF3M5mjqiGz9YviH4eSsve1iYI=
et de le comparer avec un hash que j'aurai moi même calculé cependant il n'y a pas qu'un seul node de se nom je dois donc extraire tous les hash avec les nom de fichier afin de pouvoir les comparer avec les hahs que j'aurai calculé

schématiquement parlant :

XML -> extraire hash + nom_fichier -> Programme -> comparaison entre Hash calculé et Hash extrait


on ma conseillé d'utilisé TinyXpath cependant je n'arrive pas du tout a comprendre son fonctionnement malgré la doc :s

si quelqu'un pouvait m'orienter
Vous remerciant bien cordialement

D.S