开发者

How to Parse large xml files using SAX?

开发者 https://www.devze.com 2023-02-10 10:35 出处:网络
I want to parse xml file nearly around 7Mb using开发者_Go百科 SAX, is there any methods available to set the file size or something, Please tell how to do parsing using SAX ?The point about the SAX pa

I want to parse xml file nearly around 7Mb using开发者_Go百科 SAX, is there any methods available to set the file size or something, Please tell how to do parsing using SAX ?


The point about the SAX parser is that size shouldn't really matter. Because it's event driven, the parser only needs to read a little at a time, and send you start/end events as it encounters each XML element. It doesn't build a complete model of the XML in memory (unlike for DOM).

Here's a tutorial.

0

精彩评论

暂无评论...
验证码 换一张
取 消