On Sat, 25 Nov 2006 04:59:01 -0800, Manish wrote:
Hi m not able to convert the node values of a XML file to Hashtable
Actaully i need to traverse the XML Nodes again and again and want to pick
values
on filters
what i want is to stroe the XML values in the Hashtable and return then from
Hashtable (the hashtable will be filled only once)
this will optimise the performance because the XML is not updated (or
updated rarely)
Thanks in advance
I assume you always know the exact key of the items you wish to locate in
the hash table, otherwise a hash table will not work as you can't iterate
through its contents. Perhaps you need a List<instead?
What is the problem you are having? XML files don't have nodes, so what
have you read the file into? Assuming you've loaded it into an XmlDocument
then you can just recurse down the tree and add the nodes to the hash
table.
Please explain where you're having difficulty.
Cheers,
Gadget