Visualizza post

Questa sezione ti permette di visualizzare tutti i post inviati da questo utente. N.B: puoi vedere solo i post relativi alle aree dove hai l'accesso.


Post - Prokopy

Pagine: [1] 2
1
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 10 Luglio 2012, 00:29:17 »
Hum, I think there is a mistake in your code. This line does not crashes :

Codice: gambas [Seleziona]
Print oRoot.ChildElements[iVar].GetAttribute("cod")


... but this one does :

Codice: gambas [Seleziona]
Print oRoot.ChildElements[iVar].Attributes["cod"]


We can see in the debugger output that the CElementAttributes_get method is called, not the CElement_getAttributes one.

Anyway, this is solved in the revision #4927. Thanks. :)

2
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 08 Luglio 2012, 22:38:05 »
You're right, this should return the value of the attribute. I really hate this kind of stupid bugs...
This is solved in the revision #4917.

3
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 08 Luglio 2012, 21:35:54 »
This is solved in the last revision (#4915).

4
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 08 Luglio 2012, 19:17:37 »
This is the revision 4910.

5
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 08 Luglio 2012, 17:37:40 »
I made a few more optimizations and solved a bug with UTF-8 text. With the last revision this is really faster on my machine :

Read() Non-optimized : 8139546 µsec (8.1 sec) / 1336 calls
Read() Optimized : 53112 µsec (0.05 sec) / 1336 calls

Please tell me if it is better for you too.

6
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 08 Luglio 2012, 16:54:16 »
Outch ... I noticed that too. I see with the Gambas profiler that around 8 seconds are taken only by xmlreader.read(). I know that the XmlReader class is not made for little configuration files (XmlDocument and XmlExplorer are very faster for this), but there is obviously a huge problem.

I'm still running valgrind to find what the problem is, but even on my fastest CPU, it takes a long ...  :sleepy:

7
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 03 Luglio 2012, 19:18:33 »
Is it better with the last revision ?

8
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 28 Giugno 2012, 20:28:37 »
Oops, sorry, I wasn't looking at the good element.
It works for me with the revision #4868.

9
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 27 Giugno 2012, 19:08:51 »
The spaces problem is in your code.
For Example, I replaced this line :

Codice: gambas [Seleziona]
Print "Element::" & reader.Node.Name, reader.Node.Value


... by this one :

Codice: gambas [Seleziona]
Print "Element::" & reader.Node.Name & reader.Node.Value


And there isn't spaces anymore.

10
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 27 Giugno 2012, 14:25:25 »
Citazione
I'm sorry for all this work, but I think it advisable to fix the library, to make it fully functional.
You haven't to be sorry for this. I should thank you for your bug reports. :ok:

I made some changes in the last revision (#4684), can you try this out ?

11
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 25 Giugno 2012, 19:55:51 »
I solved it in the revision 4860.

12
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 23 Giugno 2012, 21:48:26 »
Too late. I found what the problem was. :)

I solved it in the last revision (#4855 I think), and also updated the test module and the XML test file, so that they are compatible with libxml and more explicit :

Codice: gambas [Seleziona]
' Gambas module file

Public Sub Main()
  
  Dim reader As New XmlReader
  
  reader.Open("text.xml")
  reader.Read()
  While Not reader.Eof
    Print reader.Node.Type;;
    Select Case reader.Node.Type
      Case XmlReaderNodeType.Element
        Print "element"
      Case XmlReaderNodeType.Attribute
        Print "attribute"
      Case XmlReaderNodeType.Text
        Print "text"
      Case XmlReaderNodeType.Comment
        Print "comment"
      Case XmlReaderNodeType.EndElement
        Print "endelement"
      Default
      Print ""
    End Select
    reader.Read()
  Wend
  
  
End


Codice: xml [Seleziona]
<?xml version="1.0"?>
<toto machin="toto">Hello<truc>Bouh</truc><!-- Hello --></toto>


Here are the new results on my machine, first with gb.libxml :
Codice: [Seleziona]
1 element
3 text
1 element
3 text
15 endelement
8 comment
15 endelement

.. and then with gb.xml :

Codice: [Seleziona]
1 element
2 text
1 element
2 text
6 endelement
3 comment
6 endelement

Results are the same, so I think the bug is solved, please tell me if you have the same behaviour with the last revision.

13
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 22 Giugno 2012, 23:06:54 »
Thanks, exams are done now, just waiting for the results ...  :)

And I finally found the problem.
The good code (that doesn't crashes libxml) should be that :

Codice: gambas [Seleziona]
Public Sub Main()
 
  Dim reader As New XmlReader
 
  reader.Open("text.xml")
 
  reader.Read()
  While Not reader.Eof
    Print reader.Node.Type
    If reader.Node.Type = XmlNode.CommentNode Then Print reader.Node.Value
    reader.Read()
  Wend
 
 
End


I've got this with gb.xml :

Codice: [Seleziona]
8
2
2
2
6
3
 Hello


... and this with gb.libxml :

Codice: [Seleziona]
1
3
1
3
15
8
 Hello
14
15

Numbers (and so readed elements) are missing, now I've just to find why.

14
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 20 Giugno 2012, 11:00:44 »
Hi,

sorry for the time I took to reply, I have a lot of work this week (exam period).

I'm still looking for where is the bug on XmlWriter.
But for XmlReader, I still have no idea. Did you try the piece of code you gave me outside your application ?

15
Segnalazione bug / Re: Errore con i tag XmlWriter in gb.xml
« il: 17 Giugno 2012, 18:41:41 »
The State/NodeType problem has been solved in the last revision.
Do you mean #4838?

Yes.

Pagine: [1] 2