![]() ![]() When you want to retrieve small amounts of informationįor many XML-based solutions, it is not necessary to read the entire document to achieve the desired results. When the application finds the part, it returns the part number and availability, and then stops processing. For example, you can create an application that searches for a part in inventory. ![]() When you need to abort parsingīecause SAX allows you to abort processing at any time, you can use it to create applications that fetch particular data. If you must process large documents, SAX is the better alternative, particularly if you do not need to change the contents of the document. For example, a 100 kilobyte (KB) document can occupy up to 1 megabyte (MB) of memory using the DOM the same document requires significantly less memory when using SAX. With SAX, memory consumption does not increase with the size of the file. Perhaps the biggest advantage of SAX is that it requires significantly less memory to process an XML document than the DOM. As an events-based parser that processes documents in a serial manner, the Simple API for XML (SAX) presents an excellent alternative to the Document Object Model (DOM). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |