473,404 Members | 2,174 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.

Subquery using X-Path (Nested X-Path statements)

Hi all,

I am trying to convert an SQL statement into an XPath (or a sequence of
XPath) statements. More specifically, I have the following:

SELECT a
FROM b
WHERE c IN (SELECT d FROM e)

I recently learned about XPath and know how to perform simple filtering
(i.e. SELECT). However, I don't know how to work with sub-queries. I
basically don't know how or where to store a temporary result. Also,
can something similar to an IN condition be done using XPath? Can
XPath statements be nested somehow?

It would probably be more straightforward if I used XQuery. However, I
don't think it is an option, since I am programming in C# in Visual
Studio, and it looks like XQueries are not supported here.

Any help is appreciated.

Thank you

Dec 21 '06 #1
1 3191
Could you provide a concrete example of an xml document and the nodes you
need to select?

Cheers,
Dimitre Novatchev
"sql_er" <sq****@yahoo.comwrote in message
news:11*********************@48g2000cwx.googlegrou ps.com...
Hi all,

I am trying to convert an SQL statement into an XPath (or a sequence of
XPath) statements. More specifically, I have the following:

SELECT a
FROM b
WHERE c IN (SELECT d FROM e)

I recently learned about XPath and know how to perform simple filtering
(i.e. SELECT). However, I don't know how to work with sub-queries. I
basically don't know how or where to store a temporary result. Also,
can something similar to an IN condition be done using XPath? Can
XPath statements be nested somehow?

It would probably be more straightforward if I used XQuery. However, I
don't think it is an option, since I am programming in C# in Visual
Studio, and it looks like XQueries are not supported here.

Any help is appreciated.

Thank you

Dec 22 '06 #2

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

Similar topics

6
by: Ramon M. Felciano | last post by:
Helo all -- I'm trying to gain a deeper understand for what type of semi-declarative programming can be done through XML and XPath/XSLT. I'm looking at graph processing problems as a testbed for...
2
by: AR | last post by:
Hi, How can I get strings separately which contain text nodes of a given element using XSL and XPath? For example, <a> aaa 111 <b>
2
by: Jim Irvine | last post by:
Does anybody know the limit of nested iif statements you can use in Access?
1
by: redpayne | last post by:
Ok-I am doing homework out of a book and the instructions are to display an interface with 5 option buttons in a frame. When clicked, each button changes the background color of the frame. It...
9
by: paulyche | last post by:
I'm writing a program which contains an awful lot of nested if statements. I don't know how efficient this is but it definetely makes the code less readable. Does anyone have any advice on how I can...
5
patjones
by: patjones | last post by:
Hi: I have a table in my Access database, "tblWC", which contains a field called "fldTrackingStatus". Furthermore, I have a report "rptTrackingReport" which is based on tblWC (using an SQL query...
1
by: RAJ | last post by:
hi there, can anybody suggest me best sites for learning php with nested sql statements. i need sql query for searching from database with lots of options like using AND, OR etc even using...
0
by: Neil Cerutti | last post by:
The docs say: A suite can be one or more semicolon-separated simple statements on the same line as the header, following the header's colon, or it can be one or more indented statements on...
5
by: =?Utf-8?B?VGFtbXkgTmVqYWRpYW4=?= | last post by:
Hi, I am using Visual C# window creating an application to read an xml file. At some point I need to use XPathNavigator and XPathNodeIterator however when I used those subjects I get error message...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...

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.