473,404 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Unable to retrieve nodes using SelectSingleNode

Error message: "Unable to retrieve nodes using SelectSingleNode."
Can anyone tell me correct way of implementing this?
The following code always returns null:
(XML I am working with)
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <WdprAccountProfileResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://Broadridge.com/Ascendis/Services/PhaseIV/Entities/">
  3.   <Details i:nil="true" />
  4.   <RawData>
  5.     <ADP_MESSAGE Client_Number="0096" Message_id="WDPR/WDPR_ACCTPROFILES" Version="1.0" Session_Pool_id="mqpool096">
  6.     <RESPONSE>
  7.       <Turnaround/>
  8.       <RequestReturn>N</RequestReturn>
  9.       <Error_Response>
  10.         <Error_Number>9022</Error_Number>
  11.         <Error_Message>User not authorized for service</Error_Message>
  12.       </Error_Response>
  13.     </RESPONSE>
  14.     </ADP_MESSAGE>
  15.   </RawData>
  16.   <StatusCode>SUCCESS</StatusCode>
  17.   <AccountProfilesList>
  18.     <AccountProfileEntity>
  19.       <AccountName>TAIFOOK SECURITIES LIMITED</AccountName>
  20.       <AddDate>03/29/2010</AddDate>
  21.       <AdditionalInformation i:nil="true" />
  22.   <ProfileNum>01</ProfileNum>
  23. </AccountPortFolioEntity>
Here is the code I have return to retrieve node with profilenum='01':
(C# code)
Expand|Select|Wrap|Line Numbers
  1.  XmlDocument xdoc = new XmlDocument();
  2.             xdoc.Load("C:\\Documents and Settings\\My Documents\\Visual Studio 2008\\Projects\\ConsoleApplication5\\WireProfile.xml");
  3.  
  4.             string profileno = "01";
  5.             XmlNode root = xdoc.DocumentElement;
  6.  
  7.  
  8.       XmlNode node = xdoc.SelectSingleNode("./AccountProfilesList[AccountProfileEntity/ProfileNum = '" + profileno + "']");
  9.             Console.WriteLine(node["RecBankLocation"].InnerText);
  10.             Console.WriteLine(node["ReceivingBankName"].InnerText);
Sep 21 '10 #1
0 1010

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Mike | last post by:
Hi All, I am using a COM object and so I have to use a form for it to work. The problem is I need to run it as a service as well. When I run it in a test scenario everything works fine and...
3
by: Just Me | last post by:
I noticed that I don't get KeyDown nor KetPress events if NumLock is not on. I can probably find a workaround but it would be nice to know what the rules are. Can anyone tell me when KeyPress...
2
by: Nathan Pinno | last post by:
Hi, Can anyone tell me if pygame and Tkinter can work together in the same application? I thought I'd better ask before trying it, since both use widgets. Thanks, Nathan Pinno --
1
by: xpcer | last post by:
hi friends, i have an problem. i use php 4 and mysql 5.0 i was create an store procedure in mysql like this, DELIMITER $$; DROP PROCEDURE IF EXISTS...
1
by: intscript | last post by:
Hi everyone Is is possible to retrieve data using multiple select. Here is my SQL code: select sum(nPassengers) Planned, Actual, (sum(Planned) - Actual) Variance from ( select iDeptCode,...
4
by: doc | last post by:
Anyone tell me about patServer please. Does anyone know where I can find instructions on how to use patServer - spent ages on the net trying to find a 'how to'. Specifically, where to put each...
9
by: hiteshverma | last post by:
Hello friends, I am a new member to this community. I have a basic problem. I have two tables. 1) books having fields id, name, author, publication
2
by: Man4ish | last post by:
Hi , How we can find the cyclic path and path between two nodes using Depth first search algorithm in Graph Data Structure. Can i get Pseudo code or code doing the same.I will be very much thankful...
5
by: nagmvs | last post by:
Can anyone tell me about the usage of split function in Asp with Example ? i done one project using split function.and i have some problems regarding storing data in data base.I use there...
1
by: maheshgupta0248 | last post by:
Hi everyone.. Im newbie in the driver development.. till now i have developed some drivers in Linux. Now I have to change to Windows.. can anyone tell me what are the real differences between driver...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.