C++ GUI Programming with Qt 3 [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

C++ GUI Programming with Qt 3 [Electronic resources] - نسخه متنی

Jasmin blanchette; Mark summerfield

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید










Chapter 14. XML


Reading XML with SAX

Reading XML with DOM

Writing XML


XML (Extensible Markup Language) is a text file format that is popular for data interchange and for data storage.

Qt provides two distinct APIs for processing XML documents:

SAX (Simple API for XML) reports parsing events directly to the application through virtual functions.

DOM (Document Object Model) converts an XML document into a tree structure, which the application can then navigate.


There are many factors to take into account when choosing between DOM and SAX for a particular application. SAX is more low-level and usually faster, which makes it especially appropriate both for simple tasks (like finding all occurrences of a given tag in an XML document) and for reading very large files that may not fit in memory. But for many applications, the convenience offered by DOM outweighs the potential speed and memory benefits of SAX.

In this chapter, we will see how to read XML files using both APIs, and we will show how to write XML files. This chapter assumes a basic knowledge of XML.


/ 140