Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS XML DOM - HasAttributes?

Status
Not open for further replies.

agoeddeke

Programmer
Jul 23, 2002
201
US
I'm new to using the XMLDOM parser. I can see if an element has child nodes by using the "hasChildNodes" method. Is there a similar easy way to determine whether an element has attributes?

Andy
 
A node object prototype supports hasAttributes() method which returns boolean as haschildNodes(). Furthermore an element object as a node supports more precise hasAttribute(name) as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top