Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Zend 200-710 Exam - Topic 1 Question 91 Discussion

Posted by Macy on Jul 04, 2025 at 08:34 AM

What DOMElement method should be used to check for availability of a non-namespaced attribute?

Suggested Answer: C

Get Premium 200-710 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
29 comments · newest first
AS
Ashlee 11 months ago
I thought hasAttribute() was for checking existence, not availability.
DE
Delsie 11 months ago
Wait, are we sure it's not hasAttribute()?
DO
Domingo 11 months ago
I agree, getAttribute() is the way to go!
RO
Rocco 11 months ago
It's definitely getAttribute() for non-namespaced attributes.
GL
Glendora 11 months ago
Pretty sure it's getAttributeNS() for namespaced ones, right?
AD
Adell 12 months ago
I remember that hasAttribute() checks for the existence of an attribute, but I can't recall if it specifically applies to non-namespaced attributes.
WA
Wava 12 months ago
I'm a bit confused about the non-namespaced part. I want to say B, getAttribute(), but I might be mixing it up with something else.
MO
Mona 1 year ago
I feel like I saw a question similar to this in our last mock exam, and I think the answer was C, hasAttribute().
EU
Eura 1 year ago
I think it's either B or C, but I'm not completely sure. I remember practicing with attributes in DOM manipulation.
BU
Buck 1 year ago
I'm a bit confused on the difference between namespaced and non-namespaced attributes. I'll need to review that before answering this.
SA
Samira 1 year ago
B. getAttribute() seems like the obvious choice here. I'm pretty confident in that answer.
JE
Jettie 1 year ago
Okay, let me see. We're looking for a method to check for non-namespaced attributes, so I'm going to go with C. hasAttribute().
FR
Fredric 1 year ago
Hmm, I'm not totally sure about this one. I'll have to think it through carefully.
JU
Julio 1 year ago
I think the answer is B. getAttribute() is the method to use for non-namespaced attributes.
KE
Kenda 1 year ago
I'm not sure, but I think D) hasAttributeNS() might also work
AL
Alonso 1 year ago
B) getAttribute() - the Swiss Army knife of DOMElement methods. Works for both namespace and non-namespace attributes. Easy peasy!
RU
Rueben 1 year ago
Ah, the age-old question of namespaced vs. non-namespaced attributes. I'll just close my eyes and point to an answer. *blindly selects C) hasAttribute*
NA
Nancey 1 year ago
↳ replying to Rueben
User 2: Yeah, that's correct. It's used to check for availability of a non-namespaced attribute.
MO
Mozell 1 year ago
↳ replying to Rueben
User 1: I think the answer is C) hasAttribute()
ST
Stephen 1 year ago
D) hasAttributeNS() sounds like it's trying too hard. I'm sticking with the classic B) getAttribute() - can't go wrong with that.
TY
Ty 1 year ago
I was totally gonna say C) hasAttribute(), but now I'm second-guessing myself. Curse you, tricky DOMElement methods!
ED
Edelmira 1 year ago
↳ replying to Ty
No, I'm pretty sure it's D) hasAttributeNS().
CA
Catrice 1 year ago
↳ replying to Ty
I think it's C) hasAttribute().
LO
Lorean 1 year ago
I agree with Claudia, hasAttribute() makes sense for checking non-namespaced attributes
CL
Claudia 1 year ago
I think the answer is C) hasAttribute()
JU
Julio 1 year ago
B) getAttribute() is the way to go. Keep it simple, no need for all that namespace mumbo-jumbo.
EL
Elfrieda 1 year ago
↳ replying to Julio
A) getAttributeNS() might be more specific, but getAttribute() is definitely easier to use.
CH
Charlie 1 year ago
↳ replying to Julio
C) hasAttribute() could also work, but I agree that getAttribute() is simpler.
TE
Tennie 1 year ago
↳ replying to Julio
B) getAttribute() is the way to go. Keep it simple, no need for all that namespace mumbo-jumbo.
0/2000 characters

Save Cancel