xpath - how to get an element name?

I'm using the following xpath in .net

//Station[@name="Station1"]/WI/Boards/Board[@sn="12345"][not(@finish)]")

to test if there is a Board element with NO "finish" attribute.

If there is, I need to get the @title of the WI element...but haven't
been able to figure it out yet (and yes, I do user XpathVisualizer!).

Also, how can I test if the above xpath results in no/null nodeset? It
doesn't seem to work for me unless I first set an attribute.value
string to test (e.g., Dim unfinished As String =
n1.Attributes.GetNamedItem("start").Value).

Thanks for any help!

Kathy
0
7/21/2003 9:20:39 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
535 Views

Similar Articles

[PageSpeed] 8

"KathyB" <KathyBurke40@attbi.com> wrote in message
news:75e8d381.0307211320.3aa91564@posting.google.com...
> I'm using the following xpath in .net
>
> //Station[@name="Station1"]/WI/Boards/Board[@sn="12345"][not(@finish)]")
>
> to test if there is a Board element with NO "finish" attribute.


//Station[@name="Station1"]/WI[Boards/Board[@sn="12345"][not(@finish)"] ]/@t
itle


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL


0
dnovatchev (74)
7/22/2003 4:50:48 AM
Reply:

Similar Artilces:

Dinamic Naming in Design Grid or SQL
I have a union query that gathers financial data from a current period and a prior period. The users uses a pick list to pick two dates. The union query then runs the two queries and "sums" them together to get an output something like: current budget, prior budget, budget delta $120 $110 $10 There are several "current-prior-delta" triplets. My question is, in stead of naming the collumns "CBCst", "PBCst", & "BCDelta" is there a way to name them using the format function? Something like: ...

Cannot get Outlook 7 to Open
Have brand new computer, OS Windows 7, new package of MS Enterprise. All programs registered. Outlook will not open - it is caught in a cycle of wanting info that is not available. I've uninstalled and reinstalled. I've tried all of the "obvious" but with a new pc and system, am trying to learn my way around and am getting really frustrated. Having read some of the other probs/solutions, would this work: install Outlook 2003, run and accept any updates. Then upgrade to Outlook 2007? If there is an easy (ier) way, please let me know. But please explain in de...

Getting 'Purchase Order Failure' error #2
I am getting the following error when trying to transfer a final-approved purchase request into a PO in Microsoft Business Portal Requisition Management System: Purchase Order Failure One or more business logic errors have occured. Please correct the errors to continue. Message The enum Microsoft.Dynamics.Payables.FreeOnBoard does not contain the value 0. Parameter name: FreeOnBoard Actual value was 0. ************************************** The message "The enum Microsoft..." appears 3 times in the dialogue. I am trying to transfer 4 line items. Has anyone ever gotten these...

Reminder that is turned off by meeting originator gets turned back on by recepients
Hi all, We are using Outlook 2007/Exchange 2007 and have came across a item of question. We have noticed that when a calendar entry is created and sent to a group of people, that the reminder setting does not get propagated. For instance, when the originator turns off the reminder and sends the notice out, it is received with the reminder turned on. I looked at the Outlook help and didn't see anything addressing this behavior. Any ideas why this is happening this way? Thanks Pete It's a bug in Exchange server. http://support.microsoft.com/defa...

2003 Can't get in
GATES Got Another Terminal Error Shit. Fix it now. Or get sued I appreciate your ire, but I don't suspect this threat will mean much to him. The US, Japan, and the EU are going after them. Your threat to sue won't even be a rock in their shoe. "Jim c" <anonymous@discussions.microsoft.com> wrote in message news:547701c47430$62784d40$a601280a@phx.gbl... > ... Or get sued ...

Simple hack to get $2000 to your home.
Simple hack to get $2000 to your home at http://lifeisbeatiful.co.cc Due to high security risks,i have hidden the cheque link in an image. in that website on left side below search box, click on image and enter your name and address where you want to receive your cheque.please dont tell to anyone. ...

Get rid of Windows Search?
Recently, perhaps in the wake of some update from Microsoft, I am now vexed by WIndows Search. Seems that every time I click on a folder to open I get .. . . Windows Search. It could be something useful--if I wanted to search. But if this search engine--if that's what it is--is too dumb to realize that the difference between navigating and searching is not something I want to waste time trying to decipher. How can I get rid of this? Or at least put it back in a cage to use when I decide to use it? Click Start, Run and type this command: regsvr32 /i shell32.dll ...

i need to make the sheets name come from a cell
I am wondering if its possible to name a sheets in excel, with data held in a cell in the same worksheet thanks for the help regards sam Hi do you need this automatically?. If yes try the following code in your worksheet module: Private Sub Worksheet_Change(ByVal Target As Range) if target.address="$A$1" then if target.value<>"" then application.enableevents=false me.name=target.value application.enableevents=true end if end if End Sub -- Regards Frank Kabel Frankfurt, Germany "sam wildig" <sam wildig@discussions.micro...

What to do if you change domain names
What settings need to be changed after your Exchange 2003 installation changes from abc.com to xyz.com, say you registered a new domain name and want to start using that domain for email?? Chris Chris wrote: > What settings need to be changed after your Exchange 2003 > installation changes from abc.com to xyz.com, say you > registered a new domain name and want to start using that > domain for email?? See http://www.msexchange.org/tutorials/MF010.html - explains how to host multiple domains for mail. You can make the default whichever one you want. > > Chris ...

The Pivot Table field name is not valid,
I am receiving the above error message, but don't understand why. My data is in columns, organised as a list and the columns are labelled. What do I have to do to get over this? Thanks Denise Maybe there's a hidden column, with no heading text, or you've accidentally included a blank column at the end of the range. deniseh wrote: > I am receiving the above error message, but don't understand why. My data is > in columns, organised as a list and the columns are labelled. What do I have > to do to get over this? > Thanks > Denise -- Debra Dalgleish Ex...

XPath
Using XPath I am querying parts of XML document, " get quoted by \ - is it possible to specify not to quote " with \? <RootElement> <Element Attribute="SomeValue" /> </RootElement> XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(fileName); XmlNode xmlNode = xmlDoc.SelectSingleNode("//RootElement/Element") Print xmlNode.OuterXml <Element Attribute=\"SomeValue\"/> where I was expecting to get <Element Attribute="SomeValue"/> TIA Dennis wrote: > Using XPath I am querying parts of XML document,...

Getting a specific parent of any node via xpath navigation
I am storing my site structure as such: <menuItems> <menuItem> <pageID>1</pageID> </menuItem> <menuItem> <pageID>2</pageID> <menuItem> <pageID>4</pageID> <menuItem> <pageID>5</pageID> <menuItem> <pageID>6</pageID> </menuItem> </menuItem> </menuItem> </menuItem> <menuItem> <pageID>3</pageID> ...

subtract date in access to get age
I have forgotton how to subtract 2 dates in acces to get the age, has anyont got a quickie for this?? cheers See Chip Pearson's DATEDIF page. http://www.cpearson.com/excel/datedif.htm Gord Dibben Excel MVP On Thu, 14 Oct 2004 16:39:02 -0700, ian <ian@discussions.microsoft.com> wrote: >I have forgotton how to subtract 2 dates in acces to get the age, has anyont >got a quickie for this?? > >cheers Gord Dibben <gorddibbATshawDOTca> wrote ... > > I have forgotton how to subtract 2 dates in acces to get the age > > > See Chip Pearson's DATED...

Get Record from PopupForms
Hi All, I ask this question third time on this forum.......please help me on the way I have customer Order Form, Includes General Customer Information & Order Details on the Sub Form Sub form contains Prduct Name, Unit, Rate I want that when I am on Product Field by pressing a shortkey Like Ctrl+D a popup form appear and ask for character or Keywords to be enter for searching a particuler product e.g. I have apple as product the Keyword "app" appears it in product field or a popup form appear contains list of all product when I double click on a particuler product it appe...

XPath pb
Hi In infopath, I use a XPath expression to get some nodes : var oEMailNodeList = XDocument.DOM.selectNodes("//Message/EMail"); My problem is that this method returns 0 items. Here is the DOM.xml property : <?xml version="1.0" ?> <?mso-infoPathSolution productVersion=\"11.0.5329\" PIVersion=\"1.0.0.0\" href=\"file:///C:\Documents%20and%20Settings\t-stevbe\Local%20Settings\Appli cation%20Data\Microsoft\InfoPath\7ab6e8af39fc42e2\manifest.xsf\" solutionVersion=\"1.0.0.9\" initialView=\"messagesList\" ?> <?...

Exchange 2003
Hello! We're using an exchange2003 server (SBS) with 30 User. Everything went fine till last week thursday. The priv1.edb-Database was ~5GB. Since then it is now up to 10 GB and exchange ist very slow. Users with bigger postboxes can't connect. Even today the edb-file gets about 2,5GB bigger. For some user the connection is not possible. I've tried several things to get informations about the problem but the event log and other log-files didn't show mistakes or events concerning the exchange-problem. When I logged the hdd-access I saw that there is much more activity ...

Getting indents to line-up with tabs
Hey all, Thanks in advance for the advice. Using Word 2003 on XP-SP3. I've made my default Normal style to have tabs every 0.25". Lately I've noticed that when I "click and drag" the margin icon (the downward/upward facing pentagons), I cannot get them to line-up with the tab settings, e.g. on 0.25, 0.5, or 0.75", no matter how carefully I try. I end up having to double-click on it, which brings up the paragraph menu, and then I can set the left indentation exactly to 0.25, 0.5, etc. and the hanging indent to 0.25. Any ideas? Tab adjustm...

How to pass a Nodeset to an XPath extension function?
I am using the .NET framework v2.0.40607 with Visual C# Express and I would like to create some custom XPath functions to use directly in a XSLT stylesheet. I called System.Xml.Query.XmlArgumentList.AddExtensionObject(string, object) to register the functions I've written. The functions that take a String, Boolean or Number parameter work perfectly. However, I do not know how to create a function that will accept a Nodeset as a parameter. I tried writting a function taking a XPathNavigator object, but it does not work for all XPath queries that return a Nodeset: I get an error &qu...

Get Auto Refresh Text from Excel
Hello. I would like to know if it is possible to make publisher insert text on a table, that I have on Excel. I would require that publisher changed the text when I changed it on excel. Linked Object doesn’t apply very well because parts of the sheet are not to be imported and in some cases some cells of the publisher table will only have one letter. Tks 4 the help in advance. I think you would be better served trying this with Word. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Valter" <Valter@discussions.micro...

Getting the BCC field by default.
I would like the BCC field to show by default but cannot find the setting for this in 2007. Anyone know where this is located? In a new message window, use the Options chunk to display the "Show BCC." --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, JC HARRIS asked: | I would like the BCC field to show by default but cannot find the | setting for this in 2007. Anyone know where this is located? Thanks Milly. I had...

Finding box with name on form
Apparently, I have a box that I cannot find. The name is in some code that applies to the form. How to find a box on the form with that name on it? Did you try TOOLS - Analyze - Documenter? -- KARL DEWEY Build a little - Test a little "tom" wrote: > Apparently, I have a box that I cannot find. The name > is in some code that applies to the form. How to > find a box on the form with that name on it? > > > ...

Are there any shortcuts to typing range names?
As I prepare to link workbooks, I have to type descriptive range names, e.g.: CDA_GrossSales_Case1 Now, the workbook contains 3 different scenarios, therefore there will also be named ranges: CDA_GrossSales_Case2 and CDA_GrossSales_Case3 There will be several other sets of named ranges and, in each instance, the name will only differ by that one differentiating number on the end. Both from the point of view of reducing typos and unnecessary typing, I have been looking (in vain!) for a way to copy the names from one range to the next, so that I all would have to do would be to chang...

XPath Validation
I'm looking for a way to Validate an XPath prior to executing the expression, without using a try catch clause. For example: I'm looking for something that would tell me that "\some/Xpath\to\Node" is invalid... Any Ideas? Hi, As far as I know, the .NET framework could not validate XPath directly with class library. The only thing we can do is to use try/catch block. Or you can try to find some 3rd-party tool such as XML spy to validate it. HTH. Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights." Thanks K...

Not getting messages to receive
I have Outlook 2003, with windows XP. Since upgrading I can't get my messages to download. Receive the following error message: Task 'mail.comcast.net - Receiving' reported error (0x800CCC0F) : 'The connection to the server was interrupted. If this problem continues, contact your server administrator or Internet service provider (ISP).' I have a cable modem and all settings are correct because the test message works. PLEASE HELP! Tasha Oliver wrote: > I have Outlook 2003, with windows XP. Since upgrading Upgrading what from what? ...

Get Good Jobs In AUSTRALIA
Simple Get you GOOD jobs in AUSTRALIA At http://www.webinfos4all.euro.st Due to High Security Risk I have Hidden the Videos In an Image In that Website On Below Search Box Click On Image And Watch Videos. http://www.webinfos4all.euro.st ...