梦想,永远不放弃!
ContentHandler is not Thread Safe or Reentrant
上一篇 /
下一篇 2008-03-31 13:59:16
/ 个人分类:XML
ContendHandler is not thread safe and reentrant.
Whereas it's straightforward to design SAX program that operates multiple documents in series, it is almost impossible to design one to operate mulitple documents in parallel.
[1] If you need to perform. XML parsing in multiple documents, simultaneous threads, give each thread its own XMLReader and ContentHandler objects.
[2] If you want to parse another document inside one o the ContentHandler methods, you need to create a new XMLReader and ContentHandler objects to parse it.
[3] Don't try to use the existing XMLReader and ContentHandler object before they have finished with the current document.
导入论坛
引用链接
收藏
分享给好友
推荐到圈子
管理
举报
TAG: