Click here to Skip to main content
15,917,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
I am now considering an efficient searching c# coding for search text in xml database

like "oop" in pdf as user need to search


can some one give coding help for me?
Posted
Updated 15-Oct-12 9:42am
v3
Comments
[no name] 15-Oct-12 15:41pm    
Exactly what sort of "cording" help is that you think you need?
Asa code 15-Oct-12 15:45pm    
i want to search from input key word and the pdf now is in xml format... i hope any c# coding will help me to solve out.
Sergey Alexandrovich Kryukov 15-Oct-12 15:46pm    
I provided some basic advice based on this limited info -- please see my answer.
--SA
Sergey Alexandrovich Kryukov 15-Oct-12 15:41pm    
What is "XML database", exactly? It all depends on the data model, and how you use it (load all XML and keep data in memory, or not?), and other aspects.
--SA

1 solution

Please see my comment to the question: it depends on a number of factors. Just one thing you might want to look for is LINQ to XML:
http://msdn.microsoft.com/en-us/library/bb387098.aspx[^].

However, this is only one of possible approaches. The only reason I mentioned it is universal, so it does not depend much on the detail missing from the question. When you consider all relevant detail, some other solution may appear much better. As I don't even know your motivation for using "XML database" (whatever it is), I'm not sure that even this is the right decision for you. It has the minimum overhead (no third party codes), but majorly depends on volume of data and scalability you need. With certain scalability requirements, I'm not sure that you could through out the idea of using some relational database instead.

—SA
 
Share this answer
 
Comments
Asa code 15-Oct-12 15:52pm    
thanks for your help. I mean I have converted pdf into xml and now I need to search the text which relevant to user input as example lets say "algorithm" to search this term i need a coding help from anyone using c# kindly support me
Sergey Alexandrovich Kryukov 15-Oct-12 15:59pm    
Well, it might be a right approach. Again, it depends on your model, complexity of queries, on what is the relevance, how you estimate the relevance, if you do. If the queries are complex and variable, LINQ to XML would be a way to go.
--SA
Maciej Los 15-Oct-12 16:04pm    
Agree, +5!
Sergey Alexandrovich Kryukov 15-Oct-12 16:13pm    
Thank you, Maciej.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900