I have a folder with 400k + XML documents and much more, each file has the name 'ID'.xml, and each of them belongs to a specific user. In the SQL server database, I have an "ID" from the XML file associated with the user ID, where I connect the XML document to the user. A user can have an infinite number of attached XML documents (but let a maximum of> 10 thousand documents)
All XML documents have several common elements, but the structure may vary slightly.
Now, each user will have to search the XML documents belonging to her, and what I have tried so far (looping through each file and reading it using streamreader) is too slow. I don't care if it reads and matches the whole file with attributes, etc. Or just text in each element. First of all, you should return the list with the identifier from the file names.
What are the fastest and smartest methods here, if any?
source
share