Solved

test for missing xml element

Posted on 2011-02-23
1
609 Views
Last Modified: 2013-11-11
I am trying to get all nodes from a tree in c# that have a element with the value of 'NZL' or where the element is missing

I have tried both of the following pieces of code but get an invalid input string error.

Can someone help?
XmlNodeList pools = OddsDoc.SelectNodes("Response/Pools/PoolOdds/States/State[State_Name = 'NZL'or (count(State_Name)= 0)]");

XmlNodeList pools = OddsDoc.SelectNodes("Response/Pools/PoolOdds/States/State[State_Name = 'NZL'or not(State_Name)]");

Open in new window

0
Comment
Question by:jetbet
1 Comment
 

Accepted Solution

by:
jetbet earned 0 total points
ID: 34964722
Closed due to another issue being found
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now