wxXmlDocument

Yuri Borsky borsky at sbor.ru
Sat Feb 17 11:43:38 PST 2007



John Ralls <jralls at ceridwen.fremont.ca.us> ÐÉÛÅÔ ×
ÓÏÏÂÝÅÎÉÉ:70B0189C-FEBD-4556-991E-6EF68DF18CB6 at ceridwen.fremont.ca.us...

> There are two flavors of XML parsers available: Tree-based as you
> describe here, generally are based on the Document Object Model, or
> DOM. There are also event-based parsers, often, though not always,
> based on SAX; expat (which is used in wxWidgets internally and is
> part of the distribution) is an event based parser which isn't based
> on SAX. Some of the larger XML support libraries like Xerces and
> libxml2 provide both.

Thanks for the insight. Now I wonder why wxWidgets use event-based parser
internally but expose it tree-like :)

> Unless you have tight control over the format of the incoming
> documents, processing XML as plain text is a bad idea. The DTD or
> schema may insert additional content via entities and default
> attributes that plain text processing will not handle correctly.

That is true. However sometimes speed gain you get from raw text processing
makes it worth it - and yes, only when appropriate and only when you know
what you are doing:)










More information about the wx-users mailing list