![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | XML parse issue Hi, I have the following XML and I like to grab the node that is in 'List2' and mobilenum=416-222-5435 I have tried the following, XmlNode xmlNode = xmlDoc.SelectSingleNode(@"/contacts/list [@name='List2']/contact/@mobilenum=416-222-5435"); and XmlNode xmlNode = xmlDoc.SelectSingleNode(@"/contacts/list [@name='List2']/contact/@mobilenum='416-222-5435'"); but I get an error 'Expression must evaluate to a node-set.' Any idea? <contacts> <list name="list1"> <contact> <name>Name1</name> <mobilenum>416-223-3345</mobilenum> <email>maz00@newsgroup</email> <profession>Web Manager</profession> </contact> </list> <list name="List2"> <contact> <name>Name2</name> <mobilenum>416-222-5435</mobilenum> <email>email</email> <professionbbbb</profession> </contact> <contact> <name>Name</name> <mobilenum>416-223-2342</mobilenum> <email>someemail</email> <profession>aaaa</profession> </contact> </list> Thanks Maz. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| parse files | VB Script | |||
| MSXML 4.0 SP2 Parse and SDK | Vista performance & maintenance | |||
| Parse XML files from Powershell? | PowerShell | |||
| Using Parse-TextObject | PowerShell | |||