最好的解决方案是解析您的 XML 文件,如果大小允许,将其保留在内存中,在内存中执行搜索,然后仅显示搜索结果!
如果该文件无法装入内存,那么您应该查看 XML Sax 解析器,并期待允许您的最终用户在 XML 文件表示的数据中导航。
马努
I always suggest UI programmers to avoid creating huge user interface widgets such as trees and lists.
The best solution is to parse your XML file, keep it in memory if it's size allows it, perform the search in the memory and then display ONLY the result of the search !!!
If the file can't fit into memory, then you should have a look on XML Sax parser and look forward to allow your end users to navigate in the data represented by your XML file.
我总是建议 UI 程序员避免创建巨大的用户界面小部件,例如树和列表。
最好的解决方案是解析您的 XML 文件,如果大小允许,将其保留在内存中,在内存中执行搜索,然后仅显示搜索结果!
如果该文件无法装入内存,那么您应该查看 XML Sax 解析器,并期待允许您的最终用户在 XML 文件表示的数据中导航。
马努
I always suggest UI programmers to avoid creating huge user interface widgets such as trees and lists.
The best solution is to parse your XML file, keep it in memory if it's size allows it, perform the search in the memory and then display ONLY the result of the search !!!
If the file can't fit into memory, then you should have a look on XML Sax parser and look forward to allow your end users to navigate in the data represented by your XML file.
Manu