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

Home Posts Topics Members FAQ

Check for existance of an element with a particulat attribute value (id)

Hi,

Sorry for the simple question, but could anyone tell me the best way
to test for the existance of an element with a particular attribute
value (id) ?

Thanks
Nov 12 '05 #1
2 1113

so**@nospampls.com wrote:
Sorry for the simple question, but could anyone tell me the best way
to test for the existance of an element with a particular attribute
value (id) ?


//*[@id = 'someIdValue']
is an XPath that could help.
If not then tell us in which context you want to search/check, are you
using XmlTextReader for instance or XmlDocument or XSLT.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 12 '05 #2
Thanks.

On Sat, 11 Jun 2005 13:17:40 +0200, Martin Honnen <ma*******@yahoo.de>
wrote:

so**@nospampls.com wrote:
Sorry for the simple question, but could anyone tell me the best way
to test for the existance of an element with a particular attribute
value (id) ?


//*[@id = 'someIdValue']
is an XPath that could help.
If not then tell us in which context you want to search/check, are you
using XmlTextReader for instance or XmlDocument or XSLT.


Nov 12 '05 #3

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

Similar topics

0
by: Andy Howden | last post by:
I'm trying to define a schema element (allPeriodData) containing up to 50 different decimal child elements (periodData). Each child element (periodData) identifies itself with an ID having a value...
6
by: Michael Hill | last post by:
I have this code that adds a table row and within the cells I create some input elements. When I go back using javascript the functionaliuty is seeing the form element. Anyone tell why I can see...
2
by: Mike | last post by:
I´ve got a number of SPAN elements named "mySpan1", "mySpan2", "mySpan3" etc, and want to set their "style.display" to "inline". This works (only needs to work on IE5.5+): for (var x = 1; x <...
3
by: michael | last post by:
I guess this is partly a javascript questions, but is there a way to check if a CSS id or class exists anywhere on a page. For example, if the id "bla" exists, it should return true only if the...
26
by: JGH | last post by:
How can I check if a key is defined in an associative array? var users = new array(); users = "Joe Blow"; users = "John Doe"; users = "Jane Doe"; function isUser (userID) { if (?????)
4
by: Michael Mishler | last post by:
Hello all! here is my code: <script> function showMe(group){ alert(bin51.bin51.value) 'this line returns selected option just fine 'this is the line I need help with
1
by: Wayne Lian via .NET 247 | last post by:
Hi all, Just wonder anyone have encountered this problem before?I tried using XMLSPY debugger and I can get the correct outputfor my XSLT transformation, however in .net, aftertransformation the...
6
by: Martin | last post by:
Hi, I have a xml file like the one below <?xml version="1.0" encoding="utf-8"?><e1 xmlns:e1="http://tempuri.org/Source1.xsd" e1:att1="1" e1:att2="2" e1:rest="345"/> If I try to create a...
9
by: Marc | last post by:
Okay, here's the problem - I have 3 radio buttons, and 11 check boxes (which are disabled by default). I have the javascript below which when the last radio button is clicked, enables the...
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...
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
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
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: 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...
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.