J'ai l'exception NullReferenceException à cette ligne là:
string nomfichier = doc.SelectSingleNode(parametreTest.NomFile).ToString();
Pourtant il me semble que ma réference est bonne:
parametreTest.NomFile = "metadata/files/file/fileName";
Sachant que je veux récupéré le fileName.
Mon xml:
1 2 3 4 5 6 7 8 9 10
| <metadata
xmlns="http://www.sharp-world.com/sharp-mfp-metadata/datatypes"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sharp-world.com/sharp-mfp-metadata/datatypes datatypes.xsd">
<files>
<file format="pdf" encoding="none" encryption="none" compression="G4" colorSpace="none">
<fileName>MX-2700N_20090820_125441_98a336038b74_001.pdf</fileName>
<fileLocation/>
</file>
</files> |
Partager