Facing Problem with Xpath if then else concept

XML File:
<additionalFields>
    <field name="dataKey">3868</field>
    <field name="distribution">140</field>
</additionalFields>

I would like to execute following If else Xpath 2.0 statement.

String text = nav.Evaluate("if(/additionalFields/
field[@name='distribution']/text() = '140') then 'C' else ' '
").ToString();

However I am getting following error message:
'if(/additionalFields/field[@name='distribution']/text() = '140') then
'C' else ' ' ' has an invalid token.

Is there any other way to achieve the result? Any help would be
appreciated.
0
4u.rajpal (1)
6/28/2011 8:27:39 AM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
1950 Views

Similar Articles

[PageSpeed] 42

Reply:

Similar Artilces:

My product key is incorrect how do I resolve this problem?
My laptop came with Microsoft word 2007. Microsoft word tells me to put in my product key. So i put in the product key that is located on the bottom of my laptop but for some reason it says it's incorrect how do i resolve this? The product key on the bottom of your laptop is undoubtedly for Windows and not Word. Laptops often come with a trial version of Office 2007. Unless you paid extra for a retail version of the Office software it may be that your trial has now expired. -- <>>< ><<> ><<> <>>< ><<> <>>...

Weird problem
Client bought three new computers and I installed them this week. Old ones were 98 machines with office 97. New ones are XP Pro with Office XP. Server is Win2000 SBS but using more as a workgroup setup, i.e., the workstations are using workgroup not domain. All the new computers are identical and all the users have local admin rights and user rights on the server. One user is not experiencing this problem, but two of the users go to the data folder on the server, open up an existing spreadsheet, make changes, save it and close it. The next time they try to open it, it tells them they can ...

problem with multiple SMTP domains in Exchange Server 2003
Hi there I have added a second SMTP domain to the Email Addresses (Policy) as follows: Recipients > Recipient Policies > Default Policy > Email Addresses (Policy) > New ... > SMTP Address > @xyz.com > (checked) This Exchange Organization is responsible for all mail delivery > to this address > Apply. When I do so, I no longer receive external emails on the first SMTP domain (@abc.com). Is this related to relay settings, or perhaps something else? Best regards Loane ...

Problem cut-n-paste function
I'm having a bizarre problem cut-n-pasting a very simple calculation (ie = A1 � B1) in C1 down the column (ie C2 to Cn). When I cut-n-paste the function in C1, value that displays is the same as the source cell. If I click on the target cell, the correct cells are highlighted and if I hit the enter button, the formula calculates as expected. What is going on? What do I have to do to force the formula to auto calculate? Turn on Automatic Calculation <g>. You do that at Tools/Options/Calculation. On 27 Sep 2004 18:56:34 -0700, jsausten@hotmail.com (Stephen Miller) wrote: >I'm...

CRM 4.0: WebSite deployment problem
CRM 4.0: I cannot deploy my WebSite in the CRM WebSite, below is the error: 'Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthentica­tionProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' doesn't exist. Parameter name: Microsoft.Crm.WebServices.Crm2007.MultipleOrganizationSoapHeaderAuthenticat­ionProvider, Microsoft.Crm.WebServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 Description: An unhandled exception occurred during the execution of the current web request....

ActiveX Browser Problem
Hi, I am using an Activex browser control in my application. I have also implemented the IDocHostUiHandler interface for customizing it. The problem is that when i press Ctrl+N, a new internet explorer window comes up. How should i avoid it....? Thanks, gshetty ...

STATEMENT DOWNLOAD PROBLEMS #2
Hi, I am trying to download statements and keep coming up with an error which says that "A communication error has occurred. Please try or call again." I have tried deleting and recreating the OFX file extension but this hasn't helped. Does anyone have any ideas? Thanks Caz In microsoft.public.money, Cazzy123 wrote: >I am trying to download statements and keep coming up with an error which >says that "A communication error has occurred. Please try or call again." I >have tried deleting and recreating the OFX file extension but this hasn't >he...

Attachment problems #2
When someone in our office sends an e-mail from their Mac with an attachment(e.g. a jpeg file) those of us with PC's can't open it. However, if one of us with a PC can access the file, we can attach the file and send to everyone (and they can open it). What's going on? ...

Wacky migration wizard problems
Hello all, We have two separate domains with the following configuration: Single NT4 PDC running Exchange 5.5 Single W2003 DC running Exchange 2003 There is a two way trust between the domains. I ran the Migration Wizard and moved over one user account. I logged into the new domain as the user, setup Outlook with the proper settings, and got an error that the user account did not have permissions to the mailbox. I checked in system manager and Self has all the necessary rights to the mailbox. The weird thing is that we did another test migration a month ago with the same domains...

#Name? problem that has been stumping Everyone
I have been posting this message for about 5 days now and no one has been able to help. I have a macro that fills down the formula =IF(AT2 = 500,MROUND(AI2,500),IF(AT2 = 5,MROUND(AI2,5),IF(AT2 = 10,MROUND(AI2,10),IF(AT2 = 25,MROUND(AI2,25),IF(AT2 = 100,MROUND(AI2,100),IF(AT2 = 200,MROUND(AI2,200),IF(AT2 = 364,MROUND(AI2,364),ROUNDDOWN(AI2,0)))))))) Each time I fill down the range using the macro I get a #name? error. As I have posted before there is no error in the function because when I go into the status bar at the end of the formula and MANUALLY hit enter the formula calculates correctl...

I have a problem with getting a total Sum of numbers (URGENT)
I'd really appreciate if someone could help me here. I am using Microsoft Excel 2002 on a Microsoft Office XP system. I a trying to develop a minor league baseball schedule, but am having som problems. I have attached a copy of my spreadsheet to give everyone some idea o what I'm doing here. I have where the fans list the "RUNS, HITS & ERRORS) of both teams an for each game of the series. I then have it set up in the TOTA WON/LOST column where if the T-Bones RUNS are more than the SALTDOG runs, a "1" appears in the WON column. If the SALTDOGS have a highe numbe...

Outlook 2003 Add-in: Personal Folders Backup uninstall problem
Hello techie nerds out there Help! I am trying to uninstall this utility to reinstall it on another desktop on the same machine. It seems you can only run this utility on one desktop? Running windows XP pro and Outlook 2002 The programme does not show up in the Add/Remove programme window in the Control Panel. Many, many thanks Paul Paul Allen <ict@wandsworthvb.org.uk> wrote: > I am trying to uninstall this utility to reinstall it on > another desktop on the same machine. It seems you can only > run this utility on one desktop? Doesn't seem to be the case here. ...

Serious problem with Money Plus Deluxe
I have about 17 years worth of investment data in my Money file along with several years of credit card and checking account data. All of the investment transactions have been entered manually; the credit card and checking account data is downloaded online. Stock prices have been updated daily over at least the last dozen years. On Friday, after entering a bunch of new transactions which were accepted normally and shutting Money down, I tried to open my file again. After I entered my login info, Money gave me the memo that it had "encountered a problem and was shutting down.&qu...

Rows and Columns Settings Problem
How do you set rows and columns in a way that when you scrol down/column you can always see a certain row(s)/column(s) -- Message posted from http://www.ExcelForum.com Check out XL Help for "Freeze Panes" In article <JMorgan.1ad5vf@excelforum-nospam.com>, JMorgan <<JMorgan.1ad5vf@excelforum-nospam.com>> wrote: > How do you set rows and columns in a way that when you scroll > down/column you can always see a certain row(s)/column(s). Thank -- Message posted from http://www.ExcelForum.com ...

Problem opening up current Excel wksht to mail merge in Word
Hi, I have Microsoft 2007. I created a list in Excel with clients' name, address, city, state, zip. Then, in Word I go to Select Recipients, locate the Excel file and click open. Here's the problem: a Select Table box appears with Sheet1$, Sheet2$, and Sheet3$ as options. clicking on any of the three results in NOTHING. Nothing at all appears! I'm not sure what the problem might be. Thank you for the help! Rachelle ...

"Find a contact box" problem
Hi. I�m having problems with the �Find a contact� box on the Standard toolbar. Previously, I would type in a name and the search would pull up name/s from the Outlook Contacts folder first then, if the name is not in the Contacts folder, it would pull up name/s from the Global Address List if any. Now, when I type in a name, the search only pulls up name/s from the Global Address List. The search does not include the Contacts folder although there are entries in the Contacts folder. The problem started after I transferred a couple of Contacts subfolders to another pst file. How do I fix the p...

Exchange 2000 problems
Since the HD failed I have been trying to put my domain backup. The PDC, W2k, had IIS and Exchange on it. I have reloaded W2k with SP's and installed Exchange 2000. None of my virtural stores Protocols are running and when I open the properties of each the "Start, Stop, Pause" choices are grayed out. The First Storage Group/Mailbox Store is also down. When I try to Mount it I get this error: "An internal processing error has occured. Try restarting the Exchange System Manager or the Microsoft Exchange Information Store service or both." ID c1041724 Help...I'm...

Exchange 2003 ADC problems
Hi, I have the following situation.... We have multiple Exchange 5.5 sites being migrated to one Exchange 2K3 organisation (called Localmail). The first server in the 2K3 org (which had the CA Config agreement) and also the connection agreement to the EX5.5 server (in Localmail) has died and there is no suitable backup for recovery. I need to remove the connections from this dead server. I cannot remove the CA Config agreement - there is no delete option for this connection. If I try to modify the Config CA connection to run on another Exchange 2003 box in the Localmail org I get the c103a...

Problems with CTabCtrl
I derived a new class from CTabCtrl. I created four dialogs for each tab. The tab controls is displayed fine and all the controls for each tab are also displayed. The problem is that I cannot initialize the edit controls in OnInitDialog for each tab dialog. m_cNameEdit.SetWindowText( m_sName ); IDD_NAME_EDIT has 'm_cNameEdit' and 'm_sName' as member variables. Variables are defined in the CTab1Dlg class. When the tab appears there is nothing in the edit control. Thanks. "Mark F." <replytogroup@news.com> wrote in message news:21TFd.3196$Z%.402@fe1.tex...

Data Entry Problem
I am designing a database to manage staff absences. I have a number of forms (one for each manager) feeding one table for company reports etc. I have a 'member of staff' field that is a comby on each form to restrict entry for managers to their team members only. My problem is that i set the data entry property to 'Yes'. This clears the form on open but prevents me from finding records (obviously because the form is empty). If i set the data entry to 'No', all records from other managers are showing on all managers forms also. Due to data protection i need to ov...

Problem creating 2003 PST file
Hi, I am currently running Outlook 2003 (Client). I am trying to create a new PST file. However when I try to add a new file (file\new\outlook data file\) I can only select: Outlook 97-2002 Personal Folder File. On the microsoft website it says I should see something like "Office Outlook Personal Folders File (.pst)" but it is not listed. Is there any way to correct this?? I am running Outlook 2003 SP1. Thanks for any help, Wouter Hi, Kan iemand mij helpen? Het moet mogelijk zijn om bij het verzenden van een emailtje de afzender te veranderen. Ooit wist ik het, maar ik ben...

Problem with Trendline
Hello, I added a polinomial trendline to my graph. The line describes the very well, but I've been unable to figure out how to extract the numbers in the trend line, ans show them in a table. How is this done? Also, is there any help which gives some detail about how the Escel polinomial trendline graph works? Thanks very much, Keith There is no easy way to extract the information from a trendline. You are better off using LINEST, which, contrary to the help file, works just fine with polynomials. For an example see http://www.stfx.ca/people/bliengme/ExcelTips/Polynomial.htm ...

problem with GetChunk in windowsXP
Hi, I have a program using ADO with access database. It works quite smoothly in win2000, but in windows XP, there is serious problems, I use the following lines to get the buf from my db and it gives run time error. _variant_t varChunk; varChunk = MeasureDB->m_pRs->Fields->Item["Points"]->GetChunk(ChunkSize); COleVariant s1(varChunk); CString s2=s1.bstrVal; // this line gives exception error Thanks for any hints, Behzad ...

Drag Drop problem in CListCtrl
Hello , I have a CListCtrl which displays the thumbnail view of image files & other related info like file size , destination.The owner drawn property of the list cntrl is set to true. I want to be able to drag - drop the thumbnails within the list view itself. But the dragged image of the selected list item is always displayed as a black bitmap.I have used CreateDragImage , BeginDrag , DragEnter , DragMove etc for this.Why is this problem ocurring???? Also if instead of having the dragged image of the item to be displayed , i have set a default bitmap, but it too doesn't get displa...

Format Problem
I have a report of a crosstab query. I formatted the left column of the report with Text Align set to Right. The report is chopping off the last character of the term, even if I set the Right Margin to 0.5". Doing so just puts space between the right edge of the border and the end of the chopped word I have played with all of the format settings in the properties with no success. If I set Text Align to Left the word is not chopped, but I would prefer Text Align set to right. Is there a way to fix this format issue with Text Align set to the Right? -- Message posted via http://www.acce...