473,324 Members | 2,548 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,324 software developers and data experts.

JAXP XPath expression compare Documents

Hi all
Newbie to XPath. Can someone help with
an XPath expression(s) that will accomplish
the following using JAXP in J2SE-1.5.
Thanks
Jeff Higgins

In a class I have two private org.w3c.dom
Document fields; Directories,and FileList,
that are populated as below;

In a method I would like populate two
org.w3c.dom NodeSets with element nodes
as below:

populate absentInDirectories with
FileList file elements whose
text() value cannot be found in all
Directories filepath elements text() value.

populate absentInFileList with
Directories filepath elements whose
text() value cannot be found in
all FileList file elements text() value.

<directories>
<directory>
<file>
<filename>bar1.txt</filename>
<filepath>c:\bar1.txt</filepath>
</file>
<directory>
<file>
<filename>bar2.txt</filename>
<filepath>c:\foo\bar1.txt</filepath>
</file>
</directory>
</directory>
</directories>

<filelist>
<file>c:\bar1.txt</file>
<file>c:\foo2\barfly.doc</file>
</filelist>
Sep 27 '05 #1
0 1224

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

Similar topics

0
by: gael.pegliasco | last post by:
Hi, How are you dear and nice helper :) ? I'm trying to test xpath with this simple program : import xml.dom.minidom from xml.xpath.Context import Context import xml.xpath
8
by: erik_midtskogen | last post by:
Hi Folks, I'm writing a general-purpose HTML screen-scraping framework in Java (scrape new web sites without writing new code, yada yada...), and I want to use the JAXP DOM api along with XPath...
5
by: jorgedelgadolopez | last post by:
Hi all, I am using the xpathnavigator evaluate function on .net (xpath 1 right?). Now I need to expand the code to do multiple contains, compare dates (such as 'before', 'between' and 'after'),...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.