[Gambas-user] xmlDocument Bug 1336 (T Lee Davidson)
CD
claude.dessere at orange.fr
Fri May 29 18:44:35 CEST 2020
Le vendredi 29 mai 2020 à 10:13 +0200, user-request at lists.gambas-basic.org a
écrit :Send User mailing list submissions to
> user at lists.gambas-basic.org
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.gambas-basic.org/listinfo/useror, via email, send a message with
> subject or body 'help' to user-request at lists.gambas-basic.org
> You can reach the person managing the list at
> user-owner at lists.gambas-basic.org
> When replying, please edit your Subject line so it is more specificthan "Re:
> Contents of User digest..."
> Today's Topics:
> 1. Re: xmlDocument Bug 1336 (T Lee Davidson) 2. Request for new property
> z-order of the DesktopWindow object (John Rose) 3. Re: Request for new
> property z-order of the DesktopWindow object (Christof Thalhofer)
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
On 5/2/20 1:17 PM, CD wrote:
> By re-debugging the code I realized that not only the function
> Save of the XmlDocument object truncates the prolog of the xml document,
> but that the Open function of the same XmlDocument object also truncates the
same prolog.
> And in both cases (Open/Save) the Processing Instruction is deleted.
>
> Moreover, after searching unsuccessfully in the objects of the gb.xml library,
> especially in the XmlDocument object, I did not find anywhere a method
> to create/modify a Prologue (https://www.w3.org/TR/xml/#sec-prolog-dtd)
> or a Processing Instruction (https://www.w3.org/TR/xml/#sec-pi).
The Save method cannot save what isn't there. It appears that (in
gb.xml/src/document.cpp) the XMLDocument_SetContent method,
called by XMLDocument_Open, assumes that a prolog, if it exists, *always*
consists entirely of XMLDecl (lines 114-124).
It will retain a comment, but detaches it from the prolog. A Processing
Instruction is lost.
--
Lee
I fully agree with what you write!
And so, how do we do
Claude Desseré
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200529/c457e416/attachment.html>
More information about the User
mailing list