473,569 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML duplicates using Javascirpt need help!!

1 New Member
ok Here is a snippet of my xml file:

Expand|Select|Wrap|Line Numbers
  1. <Holidays>
  2.         <Data>
  3.             <Month>August</Month>
  4.             <Day>2</Day>
  5.             <Holiday>Virgin of the Angels Day</Holiday>
  6.             <Country>(CR)</Country>
  7.             <Year>2006</Year>
  8.         </Data>
  9.         <Data>
  10.             <Month>August</Month>
  11.             <Day>3</Day>
  12.             <Holiday>Fast Tishaa Beav</Holiday>
  13.             <Country>(ISR)</Country>
  14.             <Year>2006</Year>
  15.         </Data>
  16.                                 <Data>
  17.             <Month>August</Month>
  18.             <Day>3</Day>
  19.             <Holiday>Fast Tishaa Beav</Holiday>
  20.             <Country>(ISR)</Country>
  21.             <Year>2006</Year>
  22.         </Data>
  23.                                  <Data>
  24.             <Month>August</Month>
  25.             <Day>3</Day>
  26.             <Holiday>Fast Tishaa Beav</Holiday>
  27.             <Country>(ISR)</Country>
  28.             <Year>2006</Year>
  29.         </Data>
  30. </Holidays>
as you can see its simply an xml file full of holidays,days,c ountry,month, and year.

A user selects a month from a drop down list (such as august) and then all teh holidays in that month should appear. Ok now the challenge, I do not want the duplicate holidays to print out.

Im using an xpath way to do it, like this:
Expand|Select|Wrap|Line Numbers
  1. nodes = xmlDoc.selectNodes("xpath expression here");
How do I NOT print out the duplicate holidays?
Sep 11 '06 #1
0 1055

Sign in to post your reply or Sign up for a free account.

Similar topics

6
2005
by: Jani Yusef | last post by:
I have a HW problem stated as shown at the top of the solution. The thing is is that I am not 100% sure wtf constant memory means. Well, I think I do but I am confused. Does my solution use contant memory in terms of the length of the list i? If so why not and how could I change it to be so? I am sure the solution is O(n) since the list must...
4
1962
by: MARTIN DAVIES | last post by:
I hope you can help. My Linux MYSQL 3.23.52 database server is working OK generally. However, in a database I have a field name that ends with a # (hash UK as opposed to £ which is a pound UK) i.e. If I "select * from emptable" it works fine and the empnumber# field is listed correctly with all the other fields.
7
3291
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte buffer into the character pointer. The code looks like the following: #include <stdio.h> #include <stdlib.h> #include "stdafx.h" BOOL APIENTRY...
0
2055
by: Cause | last post by:
In the following code to call my website for serial registration reasons, I want to test on localhost. The code works on the internet, but this code sends me a bunch of 400 bad request errors when I use appache on port 80 localhost. Here's the code: ////////////////////////////////////////////////////////////////////////////////////// ...
1
1333
by: soft_devjava | last post by:
my environment: =========================== -php ver 5.2.0 -mysql 5 -windows xp -apache 2 -all of these are on the same machine my code: ==========================
3
2076
by: ssghill | last post by:
Okay all i'm new to the asp portion but fairly good with vbscript. My problem is that I am trying to us an asp page to enumerate an ou. The problem is when I us localhoston the intranet web server it works, but when I try to use the unc path it does not. Now I know it has something to do with permissions. Did a little research and found...
5
2802
by: Richard Gromstein | last post by:
Hello, I have an exercise that I need to finish very soon and I really need help understanding what to do and how exactly to do it. I am working on reading the chapter right now and working on it myself, but I have a feeling I won't get far. Please help me complete the exercise. I am posting what needs to be done and will be updating with...
3
1232
George Lft
by: George Lft | last post by:
<?php //beginning tag $host = "localhost"; $dbuser = "root"; $dbpass = ""; $connection = mysql_connect($host,$dbuser,$dbpass); $dbname = "tutorial"; $db = mysql_select_db($dbname); //grab data from form
3
2347
allingame
by: allingame | last post by:
Need help with append and delete duplicates I have tables namely 1)emp, 2)time and 3)payroll TABLE emp ssn text U]PK name text
0
7703
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...
1
7678
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5222
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...
0
3656
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...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
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
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.