473,473 Members | 2,179 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

anyone know XPath syntax?

with all the xml fiends out there there must be someone who has figured this out.

I can use "jobs/job[@sourcedb]" to specify all "job" elements that are children of the "jobs" main element that have the "sourcedb" attribute.
But can I specify more than one attribute, like "jobs/job[@sourcedb AND @destdb]"
?????
Nov 16 '05 #1
2 1320
You just did. The XPAth statement you provided will select all job elements
that are children of jobs that have both a @sourcedb and a @destdb element.
I don't know if it matters, but I believe that the 'and' keyword should be
lower case:

jobs/job[@sourcedb and @destdb]

HTH,
--- Nick

"Patty O'Dors" <Pa********@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
with all the xml fiends out there there must be someone who has figured this out.
I can use "jobs/job[@sourcedb]" to specify all "job" elements that are children of the "jobs" main element that have the "sourcedb" attribute. But can I specify more than one attribute, like "jobs/job[@sourcedb AND @destdb]"

?????

Nov 16 '05 #2
Patty O'Dors <Pa********@discussions.microsoft.com> wrote:
with all the xml fiends out there there must be someone who has
figured this out.

I can use "jobs/job[@sourcedb]" to specify all "job" elements that
are children of the "jobs" main element that have the "sourcedb"
attribute.
But can I specify more than one attribute, like "jobs/job[@sourcedb
AND @destdb]"


Yes, I believe that exact syntax will work - although you may have to
put "and" instead of "AND"

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: tfsquare | last post by:
All, I am new to XSLT and having some problems understanding the syntax of XPath which selects nodes in the XML document. Consider this bit of XML, which contains three outer XML elements. ...
2
by: GIMME | last post by:
For starters .... If : //input is the xpath syntax to see if an element with an attribute named start_date exists ... Then what is the xpath syntax to return elements having
14
by: inquirydog | last post by:
Hi- One frusterating thing for me with xsl is that I don't know how to make xslt throw some sort of exception when a value-of path does not exist. For instance, suppose I have the following...
0
by: Franck | last post by:
Hi, Tryin to fill range with xml data like this in my Excel Addin '1. Add Schema oExcel.ActiveWorkbook.XmlMaps.Add(tmpDs.GetXmlSchema, oRootElement) '2. Map fields...
0
by: jacqueharper | last post by:
I am having a problem with an Excel ListObject in my C# .NET application. I am trying to map an XML schema to a ListObject, and continue to get the error "The XPath is not valid because either the...
6
by: Gale | last post by:
I'm working on something in jQuery with XPath What I want to do is: if checkbox is checked, set background color od label that contain input(checkbox) to red I have this code:...
2
by: Derek Hart | last post by:
This is probably so simple. I am doing a SelectSingleNode to get the value from an XPath statement, and I simply want the 3 leftmost characters. I cannot get the syntax to work: ...
7
by: Tim Hallwyl | last post by:
Hi, there! As I understand the XPaht recommendation, the context node is a node; not a node-list, not XPath object -- but a single node. Now, the WS-BPEL 2.0 specification allows an XML simple...
14
by: Mikhail Teterin | last post by:
Hello! What's would be the syntax for a query, which would allow me to get only the elements with non-empty text-nodes? For example, from: <a><b></b></a> <c/> <d><e>meow</e></d>
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.