[Gambas-user] Error with XmlWriter tag in gb.xml - BIS

Ru Vuott vuott at ...325...
Sat Jun 16 01:16:10 CEST 2012


Hello Adrien,

in Gambas-it.org Forum I saw a new message of our friend (md9327).
He writes:

****
I downloaded the latest version of the source of Gambas3 (4833), but the anomalies persist.
The following is the code I'm using, and that is a purified extract of the original one used in pgDesigner3, for reading the configuration file, which worked before and now I go more:

Public Sub Main()
  Dim reader As New XmlReader
  Dim s As String[]
  
  reader.Open("/home/luigi/tmp/text.xml")
  While (Not reader.Eof)
    s = [reader.Node.Depth,
         reader.Node.Name,
         reader.Node.Type,
         reader.Node.Value,
         reader.Node.Attributes.Count]
    Print "[" & s.Join("],[") & "]"
    Print reader.Node.Dep

    Select Case reader.Node.Type
      Case XmlReaderNodeType.Element
        Print "Element::" & reader.Node.Name, reader.Node.Value
        For Each reader.Node.Attributes
          Print reader.Node.Name, reader.Node.Value
        Next
      Case XmlReaderNodeType.EndElement
        Print "EndElement::"
      Case XmlReaderNodeType.Text
        Print "Text::" & reader.Node.Value
    End Select 
    Print "Read = " & reader.Read() 'return EndStream
  Wend
End

There are some print to understand what they contain variables, but they are all empty. The problems do not change, both with Open (), which with FromString ().
I have also used the test file contained in the source of gambas "text.xml", the content of which is very simple:

<?xml version="1.0"?>
<toto machin="toto">Hello<truc>Bouh</truc><!-- Hello -->
</toto>
<titi>Hellow</titi>

Stò cercando di localizzare il problema nei sorgenti di gambas3 ma non riesco a trovare il bandolo della matassa, in quanto parte è in linguaggio gambas, parte è in C, parte è di libreria esterna...
****

He wrote that.


Ciao
Vuottttttttt




More information about the User mailing list