• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 636
  • Last Modified:

XML SelectSingleNode not returning expected node.

I have a strange scenario which possibly is due to my lack of understanding about namespaces...
Anyway.. I have an XMLnode called nodeCandidate which was selected from a document which is contains:

<syncID xmlns="http://schemas.4matnetworks.com/DV3/1.0/">09a6597d-cbdc-4d22-97f0-3dc7100522f0</syncID><CreationDate xmlns="http://schemas.4matnetworks.com/DV3/1.0/">18/08/2012 21:21:00</CreationDate><ModificationDate xmlns="http://schemas.4matnetworks.com/DV3/1.0/">18/08/2012 21:32:29</ModificationDate><FirstName xmlns="http://schemas.4matnetworks.com/DV3/1.0/">Alex</FirstName><LastName xmlns="http://schemas.4matnetworks.com/DV3/1.0/">Dally</LastName><AddressLine1 xmlns="http://schemas.4matnetworks.com/DV3/1.0/">3 Cherry Tree Court</AddressLine1><AddressLine2 xmlns="http://schemas.4matnetworks.com/DV3/1.0/">North Road, Aspatria</AddressLine2><TownCity xmlns="http://schemas.4matnetworks.com/DV3/1.0/">Wigton</TownCity><PostZipCode xmlns="http://schemas.4matnetworks.com/DV3/1.0/">CA7 3EN</PostZipCode><Country xmlns="http://schemas.4matnetworks.com/DV3/1.0/">GB</Country><Telephone1 xmlns="http://schemas.4matnetworks.com/DV3/1.0/">441697323810</Telephone1><Telephone2 xmlns="http://schemas.4matnetworks.com/DV3/1.0/"></Telephone2><Telephone3 xmlns="http://schemas.4matnetworks.com/DV3/1.0/">447593643125</Telephone3><IsHtmlEmail xmlns="http://schemas.4matnetworks.com/DV3/1.0/">True</IsHtmlEmail><EmailAddress xmlns="http://schemas.4matnetworks.com/DV3/1.0/">alex.dally@btopenworld.com</EmailAddress><Profiles xmlns="http://schemas.4matnetworks.com/DV3/1.0/"><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords></Keywords><CultureId>0</CultureId><Options><Option><ID>260</ID><Name>All</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>1044</ID><Name>Oil and Gas</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1075</ID><Name>Thailand</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1076</ID><Name>Singapore</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option></Options></Profile></Profiles><Documents xmlns="http://schemas.4matnetworks.com/DV3/1.0/"><Document><DocID>136ae787-0156-4086-a2de-88494645c792</DocID><Filename>Curriculum Vitae_Alex_Dally</Filename><Extension>.doc</Extension><UploadDate>18/08/2012 21:32:29</UploadDate></Document></Documents>

In VB .NET When I use the lines :
dim nodeCandidateDocuments as xmlnode
nodeCandidateDocuments = nodeCandidate.SelectSingleNode("//d1p1:Documents", mgr)

I expect to get the <Documents> node in the XMl above and everything beneath it but I get a Documents node that isn't even part of the nodeCandidate being selected from.

How can this happen?... I've debugged over and over and the resulting Documents node is definitely not within the node being selected from but is XML from another part of the downloaded XML .
0
dgloveruk
Asked:
dgloveruk
1 Solution
 
zc2Commented:
Try to put this code before you do the select

Dim mgr As XmlNamespaceManager = New XmlNamespaceManager(xmlObj.NameTable)
mgr.AddNamespace("d1p1", "http://schemas.4matnetworks.com/DV3/1.0/")

Open in new window

0
 
Ken ButtersCommented:
Is what you have pasted... the entire XML document?

It looks like you have a bunch of "orphan" child nodes with no parent node....

Your "Documents" node is not in a namespace.... it does however... have a namespace as an attribute.


If the Documents node was in a namespace... it would look like this:

<someNameSpace:Documents>
....
...
</somenameSpace:Documents>

I've added a parent node called "Root" to your XML....after adding this root...

The following should be able to get the documents node:

nodeCandidateDocuments = nodeCandidate.SelectSingleNode("//Documents")


<?xml version="1.0" encoding="windows-1250"?>
<Root>
<syncID xmlns="http://schemas.4matnetworks.com/DV3/1.0/">09a6597d-cbdc-4d22-97f0-3dc7100522f0</syncID>
<CreationDate xmlns="http://schemas.4matnetworks.com/DV3/1.0/">18/08/2012 21:21:00</CreationDate>
<ModificationDate xmlns="http://schemas.4matnetworks.com/DV3/1.0/">18/08/2012 21:32:29</ModificationDate>
<FirstName xmlns="http://schemas.4matnetworks.com/DV3/1.0/">Alex</FirstName>
<LastName xmlns="http://schemas.4matnetworks.com/DV3/1.0/">Dally</LastName>
<AddressLine1 xmlns="http://schemas.4matnetworks.com/DV3/1.0/">3 Cherry Tree Court</AddressLine1>
<AddressLine2 xmlns="http://schemas.4matnetworks.com/DV3/1.0/">North Road, Aspatria</AddressLine2>
<TownCity xmlns="http://schemas.4matnetworks.com/DV3/1.0/">Wigton</TownCity>
<PostZipCode xmlns="http://schemas.4matnetworks.com/DV3/1.0/">CA7 3EN</PostZipCode>
<Country xmlns="http://schemas.4matnetworks.com/DV3/1.0/">GB</Country>
<Telephone1 xmlns="http://schemas.4matnetworks.com/DV3/1.0/">441697323810</Telephone1>
<Telephone2 xmlns="http://schemas.4matnetworks.com/DV3/1.0/"></Telephone2>
<Telephone3 xmlns="http://schemas.4matnetworks.com/DV3/1.0/">447593643125</Telephone3>
<IsHtmlEmail xmlns="http://schemas.4matnetworks.com/DV3/1.0/">True</IsHtmlEmail>
<EmailAddress xmlns="http://schemas.4matnetworks.com/DV3/1.0/">alex.dally@btopenworld.com</EmailAddress>
<Profiles xmlns="http://schemas.4matnetworks.com/DV3/1.0/">
  <Profile>
    <ProfileName>Default</ProfileName>
    <IsEmail>True</IsEmail>
    <Keywords></Keywords>
    <CultureId>0</CultureId>
    <Options>
      <Option>
        <ID>260</ID>
        <Name>All</Name>
        <Type>Job Type</Type>
        <TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId>
      </Option>
      <Option>
        <ID>1044</ID>
        <Name>Oil and Gas</Name>
        <Type>Sector</Type>
        <TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId>
      </Option>
      <Option>
        <ID>1075</ID>
        <Name>Thailand</Name>
        <Type>Location</Type>
        <TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId>
      </Option>
      <Option>
        <ID>1076</ID>
        <Name>Singapore</Name>
        <Type>Location</Type>
        <TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId>
      </Option>
    </Options>
  </Profile>
</Profiles>
<Documents xmlns="http://schemas.4matnetworks.com/DV3/1.0/">
  <Document>
    <DocID>136ae787-0156-4086-a2de-88494645c792</DocID>
    <Filename>Curriculum Vitae_Alex_Dally</Filename>
    <Extension>.doc</Extension>
    <UploadDate>18/08/2012 21:32:29</UploadDate>
  </Document>
</Documents>
</Root>

Open in new window

0
 
käµfm³d 👽Commented:
Please post the exact (sanitized if necessary) XML you are working with, and the code you are using to parse the document (just the XML related stuff).
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
dgloverukAuthor Commented:
<?xml version="1.0" encoding="utf-8"?><Candidates d1p1:schemaLocation="http://schemas.4matnetworks.com/DV3/1.0/ schema.xsd" xmlns:d1p1="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.4matnetworks.com/DV3/1.0/"><Candidate><syncID>4f7b1910-d786-4db9-99a8-07ffc31c0661</syncID><CreationDate>16/08/2012 19:38:00</CreationDate><ModificationDate>16/08/2012 19:38:41</ModificationDate><FirstName>Pawel </FirstName><LastName>Wolny </LastName><AddressLine1>Szwolezerow St. 72/15 </AddressLine1><AddressLine2></AddressLine2><TownCity>Zabki - Warszawa </TownCity><PostZipCode>05-091 </PostZipCode><Country>PL</Country><Telephone1>0048 501223717 </Telephone1><Telephone2> 48 501223717</Telephone2><Telephone3></Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>pawelwolny71@gmail.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords>hse, ehs, fire protection</Keywords><CultureId>0</CultureId><Options><Option><ID>264</ID><Name>All</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1070</ID><Name>UK</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1074</ID><Name>Asia</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1078</ID><Name>Australasia</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1081</ID><Name>Central &amp; South America</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1083</ID><Name>Denmark</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1086</ID><Name>Norway</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1087</ID><Name>Europe (other)</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1088</ID><Name>Middle East</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>4619e05f-6fcd-4759-ab75-30e5fbfcca82</DocID><Filename>PawelWolnyCV</Filename><Extension>.doc</Extension><UploadDate>16/08/2012 19:37:48</UploadDate></Document></Documents></Candidate><Candidate><syncID>98ac3890-b274-4e7b-9808-1a365bc15681</syncID><CreationDate>22/08/2012 05:22:00</CreationDate><ModificationDate>22/08/2012 05:22:26</ModificationDate><FirstName>Majdi</FirstName><LastName>Burgan</LastName><AddressLine1>Dubai</AddressLine1><AddressLine2></AddressLine2><TownCity>Dubai</TownCity><PostZipCode>11942</PostZipCode><Country>AE</Country><Telephone1></Telephone1><Telephone2></Telephone2><Telephone3>00971508819941</Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>mzburgan@yahoo.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords>Quality Specialist</Keywords><CultureId>0</CultureId><Options><Option><ID>260</ID><Name>All</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>1044</ID><Name>Oil and Gas</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1053</ID><Name>Other</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1088</ID><Name>Middle East</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>738963fa-6a80-40fd-a649-acb93f1d63e8</DocID><Filename>Resume_Majdi Burgan</Filename><Extension>.doc</Extension><UploadDate>22/08/2012 05:22:26</UploadDate></Document></Documents></Candidate><Candidate><syncID>b78c7699-ee2c-4f06-a070-24cce5fd1d49</syncID><CreationDate>17/08/2012 13:03:00</CreationDate><ModificationDate>17/08/2012 13:03:09</ModificationDate><FirstName>melanie</FirstName><LastName>kenyon</LastName><AddressLine1>9 horridge ave</AddressLine1><AddressLine2>newton-le-willows</AddressLine2><TownCity>merseyside</TownCity><PostZipCode>wa12 0as</PostZipCode><Country>GB</Country><Telephone1>07562610857</Telephone1><Telephone2>07562610857</Telephone2><Telephone3>07562610857</Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>melkenyon@me.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords></Keywords><CultureId>0</CultureId><Options><Option><ID>262</ID><Name>Permanent</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>264</ID><Name>All</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1054</ID><Name>UK Other</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1061</ID><Name>North West</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1078</ID><Name>Australasia</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>3b9fec18-9419-4bec-ac64-ac4a47f99571</DocID><Filename>Melanie Kenyon - CV</Filename><Extension>.docx</Extension><UploadDate>17/08/2012 13:03:10</UploadDate></Document></Documents></Candidate><Candidate><syncID>eb3f6df2-510e-4dde-aef6-3674190d5a96</syncID><CreationDate>18/08/2012 08:35:00</CreationDate><ModificationDate>18/08/2012 08:35:00</ModificationDate><FirstName>Giuseppe </FirstName><LastName>Montanari </LastName><AddressLine1>Via P. Gerolamo Moretti, 15 </AddressLine1><AddressLine2></AddressLine2><TownCity>Mondolfo (PU) </TownCity><PostZipCode>61037 </PostZipCode><Country>IT</Country><Telephone1>  393311088379</Telephone1><Telephone2></Telephone2><Telephone3>  393208617223</Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>g.montan@libero.it</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords></Keywords><CultureId>0</CultureId><Options><Option><ID>255</ID><Name>All</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>261</ID><Name>Contract</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>1044</ID><Name>Oil and Gas</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1045</ID><Name>Water</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1046</ID><Name>Mining</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1049</ID><Name>Power</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>9527a8ce-c875-43bd-b93e-1d1198d972cb</DocID><Filename>GMONTAN_CV-ENG</Filename><Extension>.doc</Extension><UploadDate>18/08/2012 08:35:01</UploadDate></Document></Documents></Candidate><Candidate><syncID>09a6597d-cbdc-4d22-97f0-3dc7100522f0</syncID><CreationDate>18/08/2012 21:21:00</CreationDate><ModificationDate>18/08/2012 21:32:29</ModificationDate><FirstName>Alex</FirstName><LastName>Dally</LastName><AddressLine1>3 Cherry Tree Court</AddressLine1><AddressLine2>North Road, Aspatria</AddressLine2><TownCity>Wigton</TownCity><PostZipCode>CA7 3EN</PostZipCode><Country>GB</Country><Telephone1>441697323810</Telephone1><Telephone2></Telephone2><Telephone3>447593643125</Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>alex.dally@btopenworld.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords></Keywords><CultureId>0</CultureId><Options><Option><ID>260</ID><Name>All</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>1044</ID><Name>Oil and Gas</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1075</ID><Name>Thailand</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1076</ID><Name>Singapore</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>136ae787-0156-4086-a2de-88494645c792</DocID><Filename>Curriculum Vitae_Alex_Dally</Filename><Extension>.doc</Extension><UploadDate>18/08/2012 21:32:29</UploadDate></Document></Documents></Candidate><Candidate><syncID>9be3a8c8-75f5-46b6-b6e7-3f988cc3795c</syncID><CreationDate>21/08/2012 09:17:00</CreationDate><ModificationDate>21/08/2012 09:16:30</ModificationDate><FirstName>Andrianto </FirstName><LastName>Suparno</LastName><AddressLine1>Street 11 D number 488 C Tembagapura Papua</AddressLine1><AddressLine2>PT Trakindo Utama Jl.Kuala Tembaga Lot E3 LIP KKCRC PO Box 7014 Kuala Kencana Timika Papua</AddressLine2><TownCity>Timika</TownCity><PostZipCode>99930</PostZipCode><Country>ID</Country><Telephone1>+62 901 351377</Telephone1><Telephone2>+62 901 417741</Telephone2><Telephone3>+62 8114904931</Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>andriantosuparno@gmail.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords>andrisafety</Keywords><CultureId>0</CultureId><Options><Option><ID>1044</ID><Name>Oil and Gas</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1045</ID><Name>Water</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1046</ID><Name>Mining</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1049</ID><Name>Power</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1053</ID><Name>Other</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1077</ID><Name>Asia Other</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1083</ID><Name>Denmark</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1084</ID><Name>France</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1085</ID><Name>Netherlands</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1086</ID><Name>Norway</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1087</ID><Name>Europe (other)</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1089</ID><Name>North America</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1090</ID><Name>FMCG</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option></Options></Profile></Profiles><Documents /></Candidate><Candidate><syncID>e4626197-723a-4586-86ad-436a3b4d0e48</syncID><CreationDate>16/08/2012 13:06:00</CreationDate><ModificationDate>16/08/2012 13:05:46</ModificationDate><FirstName>Anders</FirstName><LastName>Petersen</LastName><AddressLine1> Folksangsgatan 71</AddressLine1><AddressLine2></AddressLine2><TownCity> 215 79 Malmo S</TownCity><PostZipCode> Sverige</PostZipCode><Country>SE</Country><Telephone1>  4520999888</Telephone1><Telephone2></Telephone2><Telephone3></Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>ap@ap-engineering.dk</EmailAddress><Profiles /><Documents><Document><DocID>198649cc-6b68-48cf-abca-525a1908c273</DocID><Filename>CV Anders Petersen, English</Filename><Extension>.doc</Extension><UploadDate>16/08/2012 13:05:47</UploadDate></Document></Documents></Candidate><Candidate><syncID>0315fe97-c482-4175-b122-52f81003402b</syncID><CreationDate>21/08/2012 12:57:00</CreationDate><ModificationDate>21/08/2012 12:57:20</ModificationDate><FirstName>Anabela</FirstName><LastName>Alves</LastName><AddressLine1>Van Weede van Dijkveldstraat 43</AddressLine1><AddressLine2></AddressLine2><TownCity>The Hague</TownCity><PostZipCode>2582 KR</PostZipCode><Country>NL</Country><Telephone1>+31703237338</Telephone1><Telephone2></Telephone2><Telephone3>+31631773779</Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>anabela.atanasioalves@gmail.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords>Legal</Keywords><CultureId>0</CultureId><Options><Option><ID>255</ID><Name>All</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>260</ID><Name>All</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>264</ID><Name>All</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>0c4328c0-b714-4249-847c-707a30340856</DocID><Filename>AA curriculum vitae new version 2012 DOC</Filename><Extension>.doc</Extension><UploadDate>21/08/2012 12:57:20</UploadDate></Document></Documents></Candidate><Candidate><syncID>44f61719-5f04-47ec-a4a6-6dddfaeef2bc</syncID><CreationDate>09/08/2012 15:42:00</CreationDate><ModificationDate>09/08/2012 16:13:18</ModificationDate><FirstName>David</FirstName><LastName>Gloverington</LastName><AddressLine1>65 Rylands Street</AddressLine1><AddressLine2>suburb</AddressLine2><TownCity>Wazza</TownCity><PostZipCode>WA2 7DY </PostZipCode><Country>BO</Country><Telephone1>01925 857004</Telephone1><Telephone2>07981 429156</Telephone2><Telephone3>07981 429156</Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>david.glover@firstrecruitmentgroup.com</EmailAddress><Profiles><Profile><ProfileName>Mechanical Designer</ProfileName><IsEmail>True</IsEmail><Keywords>MHD geometrical</Keywords><CultureId>0</CultureId><Options /></Profile></Profiles><Documents><Document><DocID>5a2e3bb5-7a68-462a-9c2e-ce9238245d64</DocID><Filename>DGCV</Filename><Extension>.doc</Extension><UploadDate>09/08/2012 15:42:11</UploadDate></Document></Documents></Candidate><Candidate><syncID>0319d2c1-8bc3-40d1-98d4-7dd38efcb66e</syncID><CreationDate>17/08/2012 10:37:00</CreationDate><ModificationDate>17/08/2012 10:37:08</ModificationDate><FirstName>test </FirstName><LastName>test </LastName><AddressLine1>block m </AddressLine1><AddressLine2></AddressLine2><TownCity>warrington </TownCity><PostZipCode>wa2 7dy </PostZipCode><Country>SE</Country><Telephone1>1234 </Telephone1><Telephone2>1234</Telephone2><Telephone3>1234 </Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>rararafgfgdg@firstrecruitmentgroup.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords></Keywords><CultureId>0</CultureId><Options /></Profile></Profiles><Documents><Document><DocID>d7f4fec3-bcc5-4ea7-b935-1d07a6c67994</DocID><Filename>DGCV</Filename><Extension>.doc</Extension><UploadDate>17/08/2012 10:37:08</UploadDate></Document></Documents></Candidate><Candidate><syncID>fdfd26a7-b444-48c0-9feb-8b703fc93700</syncID><CreationDate>17/08/2012 09:50:00</CreationDate><ModificationDate>17/08/2012 09:50:11</ModificationDate><FirstName>Raj Shambhusinh </FirstName><LastName>Hamirsinh </LastName><AddressLine1>A/25 Bussa Society</AddressLine1><AddressLine2>Dahej By Pass Road </AddressLine2><TownCity>Bharuch </TownCity><PostZipCode>392001 </PostZipCode><Country>IN</Country><Telephone1></Telephone1><Telephone2> 919724318238</Telephone2><Telephone3> 02642264287</Telephone3><IsHtmlEmail>False</IsHtmlEmail><EmailAddress>rajshambhu@yahoo.co.in</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords>store officer</Keywords><CultureId>0</CultureId><Options><Option><ID>262</ID><Name>Permanent</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>264</ID><Name>All</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1077</ID><Name>Asia Other</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>086060ef-8ca4-46b4-9992-ce383774a52e</DocID><Filename>S H RAJ CV </Filename><Extension>.doc</Extension><UploadDate>17/08/2012 09:50:11</UploadDate></Document></Documents></Candidate><Candidate><syncID>ea9e6811-5235-4695-adc9-a1085e195906</syncID><CreationDate>21/08/2012 06:13:00</CreationDate><ModificationDate>21/08/2012 06:12:36</ModificationDate><FirstName>Leonard Sorin </FirstName><LastName>Beizadea </LastName><AddressLine1>TOMIS bld. 336 </AddressLine1><AddressLine2></AddressLine2><TownCity>Constanta </TownCity><PostZipCode>900514 </PostZipCode><Country>RO</Country><Telephone1>0040341401643 </Telephone1><Telephone2>0040723136150</Telephone2><Telephone3></Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>beizadeasorin@yahoo.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords>mechanical, welding, QC</Keywords><CultureId>0</CultureId><Options><Option><ID>261</ID><Name>Contract</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>262</ID><Name>Permanent</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>1044</ID><Name>Oil and Gas</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1047</ID><Name>Chemicals</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1056</ID><Name>Africa</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1074</ID><Name>Asia</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1081</ID><Name>Central &amp; South America</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1088</ID><Name>Middle East</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>a9e7de32-be75-4013-995a-24f36584b12e</DocID><Filename>CV_Beizadea</Filename><Extension>.doc</Extension><UploadDate>21/08/2012 06:12:37</UploadDate></Document></Documents></Candidate><Candidate><syncID>6077fbbc-b695-4d26-89e1-af04d629d02f</syncID><CreationDate>17/08/2012 23:00:00</CreationDate><ModificationDate>17/08/2012 22:59:30</ModificationDate><FirstName>Jiaparin </FirstName><LastName>Tumog </LastName><AddressLine1>6 Jasper St. Las Pinas Royale Estate Village </AddressLine1><AddressLine2>Pulang, Lupa 2, </AddressLine2><TownCity>Las Pinas City </TownCity><PostZipCode>1742 </PostZipCode><Country>PH</Country><Telephone1> 63 2 75596961 </Telephone1><Telephone2> 63 9204663817</Telephone2><Telephone3></Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>j_tumog@yahoo.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords>Planning Engineer</Keywords><CultureId>0</CultureId><Options><Option><ID>255</ID><Name>All</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>260</ID><Name>All</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>1044</ID><Name>Oil and Gas</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1046</ID><Name>Mining</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1047</ID><Name>Chemicals</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>0397e3b4-ca32-4dc3-a0b1-d5e85b0e3612</DocID><Filename>J.Tumog_</Filename><Extension>.doc</Extension><UploadDate>17/08/2012 22:59:30</UploadDate></Document></Documents></Candidate><Candidate><syncID>eaf2bc0f-4c6a-4518-8846-af988ae1bab0</syncID><CreationDate>13/08/2012 12:17:00</CreationDate><ModificationDate>13/08/2012 12:17:10</ModificationDate><FirstName>Dave</FirstName><LastName>Jameson</LastName><AddressLine1>17 Blossom Street</AddressLine1><AddressLine2></AddressLine2><TownCity>London</TownCity><PostZipCode>E1 6PL</PostZipCode><Country>GB</Country><Telephone1>02073921714</Telephone1><Telephone2>02073921714</Telephone2><Telephone3>07877103916</Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>deejam.o@gmail.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords></Keywords><CultureId>0</CultureId><Options><Option><ID>255</ID><Name>All</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>260</ID><Name>All</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>264</ID><Name>All</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>6854776a-6b39-44cf-ac77-b16dfbcb0203</DocID><Filename>Curriculum Vitae - David Jameson</Filename><Extension>.doc</Extension><UploadDate>13/08/2012 12:17:11</UploadDate></Document></Documents></Candidate><Candidate><syncID>a6482838-5c8d-4d3c-8514-d189927fe175</syncID><CreationDate>10/08/2012 13:14:00</CreationDate><ModificationDate>10/08/2012 13:13:30</ModificationDate><FirstName>Dave</FirstName><LastName>Jameson</LastName><AddressLine1>17 Blossom Street</AddressLine1><AddressLine2></AddressLine2><TownCity>London</TownCity><PostZipCode>E1 6PL</PostZipCode><Country>GB</Country><Telephone1></Telephone1><Telephone2></Telephone2><Telephone3>07877103916</Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>david.jameson@4mat.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords></Keywords><CultureId>0</CultureId><Options><Option><ID>255</ID><Name>All</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>260</ID><Name>All</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>264</ID><Name>All</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>d2fe0693-c779-4d6c-9e66-e5967239e25e</DocID><Filename>Curriculum Vitae - David Jameson</Filename><Extension>.doc</Extension><UploadDate>10/08/2012 13:13:30</UploadDate></Document></Documents></Candidate><Candidate><syncID>f266fc3d-6d8f-427e-8bc9-def3e6ff02f4</syncID><CreationDate>17/08/2012 16:15:00</CreationDate><ModificationDate>17/08/2012 16:14:43</ModificationDate><FirstName>Paul</FirstName><LastName>Mellor</LastName><AddressLine1>53 Branksome Drive </AddressLine1><AddressLine2>Heald Green </AddressLine2><TownCity>Cheadle</TownCity><PostZipCode>SK8 3AL </PostZipCode><Country>GB</Country><Telephone1>0161 4986351 </Telephone1><Telephone2>07889811777</Telephone2><Telephone3></Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>p.mellor74@gmail.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords>Autocad </Keywords><CultureId>0</CultureId><Options><Option><ID>260</ID><Name>All</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>1053</ID><Name>Other</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1061</ID><Name>North West</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1079</ID><Name>Perth</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>30af1333-83fa-407f-8a32-b91d53946e90</DocID><Filename>CV</Filename><Extension>.doc</Extension><UploadDate>17/08/2012 16:14:43</UploadDate></Document></Documents></Candidate><Candidate><syncID>7089cbd7-7c5b-45c2-a3bb-e1fd9c0c5f28</syncID><CreationDate>21/08/2012 05:19:00</CreationDate><ModificationDate>21/08/2012 05:18:47</ModificationDate><FirstName>Peter</FirstName><LastName> Mallinson</LastName><AddressLine1>SheenView B&amp;B</AddressLine1><AddressLine2>Killaha East</AddressLine2><TownCity>Kenmare</TownCity><PostZipCode>none</PostZipCode><Country>IE</Country><Telephone1>00353646642817</Telephone1><Telephone2></Telephone2><Telephone3>00353872171213</Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>oim4hire@gamil.com</EmailAddress><Profiles><Profile><ProfileName>OIM</ProfileName><IsEmail>True</IsEmail><Keywords>OIM, Superintendent, Manager</Keywords><CultureId>0</CultureId><Options><Option><ID>260</ID><Name>All</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option></Options></Profile><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords>OIM, Manager, Superintendent, Offshore</Keywords><CultureId>0</CultureId><Options><Option><ID>1044</ID><Name>Oil and Gas</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1056</ID><Name>Africa</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1074</ID><Name>Asia</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1078</ID><Name>Australasia</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1081</ID><Name>Central &amp; South America</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1088</ID><Name>Middle East</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1089</ID><Name>North America</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>4e80d1cb-b7fc-45e4-9540-9a18e12d3487</DocID><Filename>1 New_CV July 12</Filename><Extension>.doc</Extension><UploadDate>21/08/2012 05:18:48</UploadDate></Document></Documents></Candidate><Candidate><syncID>c6fc1282-1a20-4477-8f73-e2d4730b147a</syncID><CreationDate>21/08/2012 08:38:00</CreationDate><ModificationDate>21/08/2012 08:37:34</ModificationDate><FirstName>Mohamed </FirstName><LastName>Elnaggar     </LastName><AddressLine1>3 Ibrahim Khalil Street </AddressLine1><AddressLine2> Mashaal</AddressLine2><TownCity>Mansourah </TownCity><PostZipCode>1452 </PostZipCode><Country>EG</Country><Telephone1>0020502382189 </Telephone1><Telephone2>00201224105855</Telephone2><Telephone3>  201119681972  </Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>ym_sabry@yahoo.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords>Painting Coating</Keywords><CultureId>0</CultureId><Options /></Profile></Profiles><Documents><Document><DocID>fb98177e-36a4-4477-a6d3-dce79aaede93</DocID><Filename>Coating-Painting and Insulation Engineer CV</Filename><Extension>.doc</Extension><UploadDate>21/08/2012 08:37:35</UploadDate></Document></Documents></Candidate><Candidate><syncID>652198c1-bddc-4a16-9674-f248334dcb5e</syncID><CreationDate>22/08/2012 03:37:00</CreationDate><ModificationDate>22/08/2012 03:36:33</ModificationDate><FirstName>salmon</FirstName><LastName>siregar</LastName><AddressLine1>batam</AddressLine1><AddressLine2></AddressLine2><TownCity>batam</TownCity><PostZipCode>29432</PostZipCode><Country>ID</Country><Telephone1></Telephone1><Telephone2></Telephone2><Telephone3>+6281364700615</Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>salmon_siregar@yahoo.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords></Keywords><CultureId>0</CultureId><Options><Option><ID>260</ID><Name>All</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>1044</ID><Name>Oil and Gas</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1074</ID><Name>Asia</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1078</ID><Name>Australasia</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1082</ID><Name>Mainland Europe</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>597dbd49-7602-47b9-9251-0de4bd6d51f5</DocID><Filename>CV+Salmon+Parulian+Siregar+august+2012</Filename><Extension>.doc</Extension><UploadDate>22/08/2012 03:36:34</UploadDate></Document></Documents></Candidate><Candidate><syncID>5f52ea1f-22d0-4175-9f79-f580167f8a4e</syncID><CreationDate>17/08/2012 21:14:00</CreationDate><ModificationDate>17/08/2012 21:13:34</ModificationDate><FirstName>Bradley </FirstName><LastName>Coleman </LastName><AddressLine1>13613 Wilhelm Drive </AddressLine1><AddressLine2></AddressLine2><TownCity>Alexander, Arkansas </TownCity><PostZipCode>72002 </PostZipCode><Country>US</Country><Telephone1> 1 501 794 0735 </Telephone1><Telephone2> 1 832 640 1873</Telephone2><Telephone3></Telephone3><IsHtmlEmail>True</IsHtmlEmail><EmailAddress>colemanbs@aol.com</EmailAddress><Profiles><Profile><ProfileName>Default</ProfileName><IsEmail>True</IsEmail><Keywords>Lead or Principal Process Engineer</Keywords><CultureId>0</CultureId><Options><Option><ID>261</ID><Name>Contract</Name><Type>Job Type</Type><TypeId>0af48c66-2237-494d-9279-4c93babf832b</TypeId></Option><Option><ID>1044</ID><Name>Oil and Gas</Name><Type>Sector</Type><TypeId>c33c861e-d1a6-4ee5-aebf-1e8faa608d42</TypeId></Option><Option><ID>1071</ID><Name>Ghana</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1072</ID><Name>Kenya</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1074</ID><Name>Asia</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1078</ID><Name>Australasia</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option><Option><ID>1088</ID><Name>Middle East</Name><Type>Location</Type><TypeId>e9926cf5-8ce6-4bc5-aef1-628555596ae1</TypeId></Option></Options></Profile></Profiles><Documents><Document><DocID>27258110-fb29-4b26-be4c-19049ead8bdd</DocID><Filename>B_Coleman_CV_-_August_2012</Filename><Extension>.doc</Extension><UploadDate>17/08/2012 21:13:34</UploadDate></Document></Documents></Candidate></Candidates>

This is the entire XML source...
My code is essentially as follows :

Dim mgr = New XmlNamespaceManager(doc.NameTable)
Dim NodeCandidate as XMLNode
dim nodeCandidateDocument as XMLNode
mgr.AddNamespace("d1p1", "http://schemas.4matnetworks.com/DV3/1.0/")
Dim nodeCandidates As XmlNodeList = doc.SelectNodes("//d1p1:Candidate", mgr)
For each NodeCandidate as XMLNode in Nodecandidates
         nodeCandidateDocument = nodeCandidate.SelectSingleNode("//d1p1:Documents",mgr)
next

In most cases the nodecanidate Document retrieves the correct XML but when NodeCandidate contains Alex Dally and the document selection is made it is Pawel Wolny who's document is picked out even though in debug the nodeCandidate only contains only XML relating to Alex Dally.

Is there something ambiguous about my selections or does the namespacing impact this?
0
 
käµfm³d 👽Commented:
From what I can see, your code looks and works fine. Does the XML you posted exhibit this behavior?
0
 
dgloverukAuthor Commented:
As you can see before and after the selectsinglenode the empty nodecandidate somehow aquires content not visible within the visualizer and the program incorrectly organises the data subsequently.

Visualiser of NodeCandidates prior to line step...
Post executing the line, the contents of NodeCandidateDocument contain something not within the XML of NodeCandidate?
0
 
dgloverukAuthor Commented:
I ended up getting assistance from XML expert and after trapping through my code they could not explain how these values failed.
The solution in the end was not a comfortable one but it worked.. we created a new empty node, passed the contents to it before doing the selection and then it worked.
This shouldn't have been neccesary but no other explanation was found.
0
 
dgloverukAuthor Commented:
No solution was found for the problem, only a work around.
0

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now