Hi, I'm having some troubles with XML serializing. I'm working on a
university project that consists of a 3D visor that should receive its
input via XML files, validate them using a set of XSD files (I've
created this "baroque" architecture because I'd like to implement the
visor using a plugin architecture, where object that can be drawn are
plugins that can be loaded at runtime by the user). The problems arise
when I try to insert/remove from the main XSD schema the <include>
declarations of the schemas of the plugins: I load the XML file using
DOM, modify it as I need and rewrite it back on the file, but something
goes wrong and the XML tree isn't written back for a while and the file
has zero size for a bit, so when I access the file again to perform some
computations the root of the XML tree read from the file is NULL.
Instead of pasting here snippets of code, I've uploaded the entire
project so everything can be compiled and tested without much effort, it
can be downloaded from here:
http://www.roby1984.netsons.org/3DVisor-0.0.1.tar.bz2
I suggest to compile it using the following procedure:
$ configure --prefix=/(path/to/dir)/sandbox
$ make
$ make install
to avoid filling your system with buggy executables ;-)
The files involved in managing XML are XMLParser.cc, XMLParser.hh and
XMLDOMErrorReporter.hh, the program seems to ignore the target_->flush()
command at line 444 in XMLParser.cc (XMLParser::serializeXML()) and
leave an empty file until the next routine invoked by main(), that is,
addSchema(), loads the file and finds it empty.
I'm going mad on those errors, it's about two weeks I'm trying to
resolve this bug...
Thanks in advance to anyone willing to help me!
                                          Roberto

Reply via email to