XML serialization functionality
Frans Englich
frans.englich at telia.com
Sun Mar 19 11:39:50 GMT 2006
Ok, I got a first draft of a class for serializing XML. It's called XMLWriter,
located in XMLWriter.{cpp,h}, found at:
https://svn.kde.org/home/kde/trunk/kdenonbeta/kdom/xpath/kxqts/lib/
Tests and doxygen files are in the tests/ subdir.
The class documentation hopefully explains the class. Other than that it's the
usual drill: no memory leaks/errors(valgrind), no Qt compat code, no
warnings, d-pointerification, QTestLib tests(data-driven).
It's still unclear where the class will end up, which explains the namespace
and the class name. The Private class is for now inside the class definition
and not called XMLWriterPrivate.
My idea is to create an "XMLIndenter" class(which KOffice seems to need)
depending on feedback. XMLIndenter would sub-class QXmlContentHandler, have a
content handler("QXmlContentHandler *contentHandler() const", etc) and a
property for the indentation string("void setIndentString(const QString &i)",
etc). It would re-implement all the handler functions and before/after
sending forwarding to its contentHandler(), it would push indentation via
characters().
From what I can tell, what I've left out from KoXmlWriter is indentation(will
be handled by XMLIndenter); 2) OASIS specific stuff, and 3) well, perhaps
helper functions.
What do people think? What is missing? What needs correction? Comments?
Cheers,
Frans
More information about the kde-core-devel
mailing list