posted 23 years ago
Hi Beno�t,
Even i did the same thing to build DOM tree with Xerces as below
So finally i get the Vector of Hashtables in return.
If i pass "item" in the getAllElements(ElementName) method i will get all the occurances of "item" element in vector and their
corresponding attribute name(as a key in Hashtable) and attribute value( as a value in Hashtable).
My reqt. is to get in a single vector of <item> elements, which has hashtable with element name(as a key) and element value(as a value) and if there are any attributes under this, that should have one more hashtable with attr.name and value.
Does XPath solve this problem.
Or
Can we do it with Xerces alone
How XPath will be useful
Any ideas?
Thanks,
Anil
SCJP 1.5, SCEA, ICED (287,484,486)