473,786 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

slightly convoluted sorry if repost didn't see last one

Hi.

This is a slightly convoluted question, but maybe it is obvious..

<convolutedques tion>
I'd like to search a set of xml documents and get the element name and
its id attribute of everything that does not have a <dlgancestor.
The hard part for me is I want to skip all documents if they have
<clientelemen ts with less than two <majortabdescen dent elements.

So basically I would like to exclude some of the documents from the
results based on their content.. for example the query would skip xml
file 1 below, but include xml file 2:

xml file 1

<big picture>
<client>
<area>
<majortab ... />
<majortab .../>
</area>
</client>
</big picture>
xml file 2

<big picture>
<client>
<area>
<majortab .../>
</area>
</client>
</big picture>

So If I wanted to find element in every file (above just xml file 2)
that had an attribute called "select", I'd do something like this
(except this doesn't fly):

for $doc in collection('c:\ myxmldir')
for $b in $doc //clientarea[count(child::ta b) 1]
for $a in $b //*[@select]
return
<Atable>{$a}</Atable>

</convolutedquest ion>
Oct 24 '08 #1
0 1000

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

Similar topics

1
1624
by: middletree | last post by:
Hate to post this in a separate post, but felt that the last thread was too far down to get noticed. It is called dynamic checkboxes, and it contained some good advice for me, but it led to another question, and I wanted to go ahead and post my question here in hopes of getting an answer. The advice given to me about having a number of checkboxes which are put onto the page from the database, was to name them all the same thing, and...
36
2864
by: Hoopster | last post by:
Hello, I know nothing about C++ but want to get started. Is there any good free C++ program that I can try to see if I like programming? I also need a good free compiler. I don't want to purchased the regular VB C++ until I know that I will like it.
3
1386
by: Jeremy Ames | last post by:
Can someone please help with this? Unfortunately, that did not work. "Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote in message news:uwMY%23fquDHA.2308@TK2MSFTNGP11.phx.gbl... Hi Jeremy, Please try using 127.0.0.1 instead of (local) in the connection string: cnTask.ConnectionString="Data Source=127.0.0.1;" +
67
2955
by: Scott M. | last post by:
Can anyone give me any ideas on why VS.NET 2003 running on XP Pro. (P4's with 1GB RAM) would take over 3 minutes to simply create a new ASP.NET Web Application on http://localhost? It seems that the IIS directory gets created right away, but it is not configured as an application directory until several minutes go by. Thanks, Scott M.
0
1233
by: Alan Silver | last post by:
Hello, I am having a problem setting and resetting cookies. I'm sure I just doing something really stupid as this is such a basic issue, but I can find any answer. Please can someone help me? The following code is a complete page that demonstrates my problem. If you save this as an .aspx and load it in a browser, it tells you it is creating the cookie. If you reload the page, it tells you it is changing the value. If you reload it...
8
1346
by: Peter Proost | last post by:
Hi, this is my (simplified) situation: I have got 3 forms and one usercontrol: their names are: container (startup object),myform,another, mycontrol contair has got IsMdiContainer set to true, a mainmenu with a menuitem,
1
928
by: Robert Dufour | last post by:
IDE in Vs2005 won't let me step through the code in the application events unhandledexception event. The IDE brings up its own unhandled exception dialog which prevents me from stepping through further code. What do I need to do to be able to step through code in the applicationevents unhandledexception event. I posted a few days ago and got no reply, sorry to repost, maybe someone has an answer, this is a hangup for my app and I really...
3
1390
by: Bart Simpson | last post by:
Didn't appear last time, trying again ... I have a class that has a member that is a const reference: class MyClass { public: MyClass(const AnotherClass& ac); MyClass(const MyClass& mc); //....
4
1264
by: kishjeff | last post by:
I'm still looking at this.. is this even possible? I'd like to search a set of xml files I want to skip all xml files that have a <clientelement that contains more than one <majortabelement, but otherwise search for some elements with a @select attribute. So I'm not sure how to skip the docs (or at least prevent them from being included in the results) that have say: <client>
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10360
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8988
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7510
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4064
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 we have to send another system

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.