This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

One more  RSS feed

 
jim yin
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
31)
When using the DOM API, how does a developer access attribute values?

a) call the getAttribute() method on Node

b) call the getAttribute() method on Element

c) call the getAttributes() method on Node and iterate over the NamedNodeMap

d) call the getAllAttributes() method on Element and iterate over the NamedNodeMap

e) call the getAttributeNode() method on Element and access the value property on Attr

This is another one I am not clear about. a) b) e) might be correct answers. But I am not sure.
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Based on http://java.sun.com/j2se/1.4/docs/api/index.html b,c and e are right.
Cheers,
Dan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!