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!

Reply to Obislavu for my previous question

Status
Not open for further replies.

VenkatRastapuram

Programmer
Oct 24, 2003
46
IN
Hello Obislavu,

Thank you for responding to my question. As I said earlier that I want to search for a pattern in a file.

The following are the answers to your questions.

1) I am using a XML file as a source file.

2) Yes I search the entire file.(answer to your first question)

3) No, I need to search the entire file.(answer to your second question)

4) Yah, I have to do this operation many times on the same file but my file will be updated for every one week.(answer to your third question)

Please try to help in solving my problem.

Regards,
R.Venkatesh
MakeLogic
venkat@makelogicmldb.com
 
Have a thread that is watching your xml file for updates.
Load the xml file into XmlDocument every time the watching thread notifies it.
Now you could iterate through XmlNodes to perform the search of the pattern.
Here you could improve the performance of the search in the tree of XmlNode objects and XmlDocument offers the navigation functions.
Maybe you should indentify first the pattern of nodes and search only these nodes.
You could modify the in memory xmlDocument object to store additional XmlNode objects or modify the existing ones which are more frecvently searched by implementing a trace alogorithm and next time you will not look these nodes because the file didn't change.
You could use a flagging system or assign some points to nodes depending the patterns you are using.
obislavu
 
VenkatRastapuram -

Please don't reply in another thread. Just add on to your existing thread.

Thanks.
Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top