[vtkusers] [Issue N25869] Fw: URGENT ! Bug with QDomDocument::toString()

Sebastien Auclair sxa at fluent.com
Thu Jul 3 14:27:27 EDT 2003


I think we've found the problem but i would like to get your confirmation...

As i explained before, we are using QDomDocument to save our data as an XML
tree.
But sometimes, the data we need to save is itself XML data.
We discovered that QDomDocument translate every values containing XML like
tags to something else so that it doesn't get confused when reading the file
back.
We think that this parsing\translation process is what is causing the
problem.

For exemple, if a create a value this way :
    QString value = "<key><StringType val=\"soldername\" /></key>";
    QDomText t = Document->createTextNode(value);         // Document is a
QDomDocument instance.

QDomDocument cannot let that happen cause it would corrupt the XML
structure. So it seams to parse this value to produce :
    &lt;key>&lt;StringType val=&quot;soldername&quot; />&lt;/key>

I hope it makes sense...
Can you confirm that this is our problem ?

Thanks !
___________________________________
Sebastien Auclair



----- Original Message -----
From: "Sebastien Auclair" <sxa at fluent.com>
To: <support at trolltech.com>
Sent: Thursday, July 03, 2003 8:46 AM
Subject: Re: [Issue N25869] Fw: URGENT ! Bug with QDomDocument::toString()


> I forgot to mention...
> If we don't save these XML strings values, then everything is working
great.
> But as soon as we include them,... the problem appears again.
>
> Just to make sure this XML in XML stuff is clear :
>
> We have a Server class responsable for receiving requests to save and
> restore values. Each value that needs to be saved is provided with an ID.
> If it receives a request to save a flot, the XML server class will
translate
> the value into a string, create a QDomNode named ID and save the
> float\string value as an attribute or a QDomText child node.
>
> The XML server may receive a request to save a string which of course is
the
> simplest case.
> But in our system, this string may be XML data. We don't want the XML
server
> to know that and we want the entire string to be save like any other
regular
> string value.
> When the client requests the value back, if it was XML data, it as to be
> retreived like it was provided in the first place !
>
> Hope it makes sense !
>
> Thanks again !
> _______________________________________
> Sebastien Auclair
> Fluent inc
>
> ----- Original Message -----
> From: <support at trolltech.com>
> To: "Sebastien Auclair" <sxa at fluent.com>
> Cc: <support at trolltech.com>
> Sent: Thursday, July 03, 2003 7:56 AM
> Subject: Re: [Issue N25869] Fw: URGENT ! Bug with QDomDocument::toString()
>
>
> > Hi Sebastien,
> >
> > On Wednesday, 02. jul 2003 09:57 Sebastien Auclair wrote:
> > > We've done another test with a medium sized model (XML tree) and this
> > > time it terminates but it take like 5 Min to do so.
> > > The size of the QDomDocument is definitly connected to the problem.
> >
> > Could you possibly send us a reproducible example? Or perhaps an XML
> > file we can load so that we may see the problem?
> >
> > Thanks.
> >
> > --
> > Jan Erik Hanssen
> > Trolltech AS, Waldemar Thranes gate 98, NO-0175 Oslo, Norway
>




More information about the vtkusers mailing list