public static readonly string XML = @"<ImportSession>
<Batch Name='MSG_SaintGobainPam_20210118' Description='SaintGobain_20210118'
BatchClassName='SAINTGOBAIN - Faturas Notas' Processed='1'>
<BatchField Name='CAPALOTE' Value='0' />
<BatchField Name='NCONTENTOR' Value='0' />
<Document FormTypeName='DOC_SaintGobain_Faturas_Notas'>
<IndexField Name='ETIQUETA' Value='ZE80047804' />
ImportFileName='\\umm\c$\acxmlaid\SaintGobain\20210118\ZE80047804.pdf' />
<Document FormTypeName='DOC_SaintGobain_Faturas_Notas'>
<IndexField Name='ETIQUETA' Value='ZE80047842' />
ImportFileName='\\umm\c$\acxmlaid\SaintGobain\20210118\ZE80047842.pdf' />
<Document FormTypeName='DOC_SaintGobain_Faturas_Notas'>
<IndexField Name='ETIQUETA' Value='ZE80047843' />
ImportFileName='\\umm\c$\acxmlaid\SaintGobain\20210118\ZE80047843.pdf' />
<Document FormTypeName='DOC_SaintGobain_Faturas_Notas'>
<IndexField Name='ETIQUETA' Value='ZE80047849' />
ImportFileName='\\umm\c$\acxmlaid\SaintGobain\20210118\ZE80047849.pdf'/>
<Document FormTypeName='DOC_SaintGobain_Faturas_Notas'>
<IndexField Name='ETIQUETA' Value='ZE80047853' />
ImportFileName='\\umm\c$\acxmlaid\SaintGobain\20210118\ZE80047853.pdf' />
<Document FormTypeName='DOC_SaintGobain_Faturas_Notas'>
<IndexField Name='ETIQUETA' Value='ZE80047854' />
ImportFileName='\\umm\c$\acxmlaid\SaintGobain\20210118\ZE80047854.pdf' />
<Document FormTypeName='DOC_SaintGobain_Faturas_Notas'>
<IndexField Name='ETIQUETA' Value='ZE80047855' />
ImportFileName='\\umm\c$\acxmlaid\SaintGobain\20210118\ZE80047855.pdf' />
<Document FormTypeName='DOC_SaintGobain_Faturas_Notas'>
<IndexField Name='ETIQUETA' Value='ZE80047860' />
ImportFileName='\\umm\c$\acxmlaid\SaintGobain\20210118\ZE80047860.pdf'/>
ErrorCode='20' ErrorMessage='Illegal file format
(\\umm\c$\acxmlaid\SaintGobain\20210118\ZE80047860.pdf)' />
<Document FormTypeName='DOC_SaintGobain_Faturas_Notas'>
<IndexField Name='ETIQUETA' Value='ZE80047861' />
ImportFileName='\\umm\c$\acxmlaid\SaintGobain\20210118\ZE80047861.pdf'/>
public static void Main()
XmlDocument doc = new XmlDocument();
doc.LoadXml(Program.XML);
XmlNodeList nodes = doc.SelectNodes(@"//Pages/Page");
Console.WriteLine($"Selected {nodes.Count} nodes");
foreach( XmlNode node in nodes )
Console.WriteLine($"{++i} {node.Name}: {node.Attributes["ImportFileName"].Value}");