[Gambas-user] Issue 305 in gambas: XmlReader doesn't parse the XML correctly when using depths and some empty values are contain garbage

gambas at ...2524... gambas at ...2524...
Sat Aug 11 21:05:16 CEST 2012


Status: New
Owner: ----
Labels: Version Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any  
Desktop-Any GUI-Any

New issue 305 by uAle... at ...626...: XmlReader doesn't parse the XML  
correctly when using depths and some empty values are contain garbage
http://code.google.com/p/gambas/issues/detail?id=305

1) Describe the problem.

The new gb.xml component output is different then the "old" gambas2  
version. The XmlReader doesn't support node depth and empty values contain  
garbage. The new component doesn't seem to support the complete XML spec?

2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate):

Version: TRUNK and 3.2.1
Revision: r5025, r5026, r5027
Operating system: Linux
Distribution: Lubuntu
Architecture: x86
GUI component: n/a
Desktop used: LXDE

3) Provide a little project that reproduces the bug or the crash.

The XMLParser example contains a XML response received from the weatherbug  
website. The gambas2 project produces the following output (the first 2  
parts are the node depth names!):
aws:weatherxmlns:aws|=|http://www.aws.com/aws
aws:weatheraws:apiversion|=|2.0
aws:weatheraws:locationsaws:locationcityname|=|Zwijndrecht
aws:weatheraws:locationsaws:locationstatename|=|
aws:weatheraws:locationsaws:locationcountryname|=|Netherlands
aws:weatheraws:locationsaws:locationzipcode|=|
aws:weatheraws:locationsaws:locationcitycode|=|71394
aws:weatheraws:locationsaws:locationcitytype|=|1
aws:weatheraws:locationsaws:locationcityname|=|Zwijndrecht
aws:weatheraws:locationsaws:locationstatename|=|
aws:weatheraws:locationsaws:locationcountryname|=|Belgium
aws:weatheraws:locationsaws:locationzipcode|=|
aws:weatheraws:locationsaws:locationcitycode|=|50991
aws:weatheraws:locationsaws:locationcitytype|=|1
aws:weatheraws:locationsaws:locationcityname|=|Zakynthos
aws:weatheraws:locationsaws:locationstatename|=|
aws:weatheraws:locationsaws:locationcountryname|=|Greece
aws:weatheraws:locationsaws:locationzipcode|=|
aws:weatheraws:locationsaws:locationcitycode|=|63454
aws:weatheraws:locationsaws:locationcitytype|=|1

When i run this on gambas3 i loose all the node depths:
xmlns:aws|=|http://www.aws.com/aws
version|=|2.0
cityname|=|Zwijndrecht
statename|=|
countryname|=|Netherlands
zipcode|=|
citycode|=|71394
citytype|=|1
cityname|=|Zwijndrecht
statename|=|
countryname|=|Belgium
zipcode|=|
citycode|=|50991
citytype|=|1
cityname|=|Zakynthos
statename|=|
countryname|=|Greece
zipcode|=|
citycode|=|63454
citytype|=|1

Also the fields like "zipcode" doesn't contain any value in the XML, this  
gives garbage in the output (not visible in the copy-paste above, but  
clearly visible in the debugger - i done this with gambas2 and gambas3)

4) If your project needs a database, try to provide it, or part of it.

5) Explain clearly how to reproduce the bug or the crash.

6) By doing that carefully, you have done 50% of the bug fix job!

IMPORTANT NOTE: if you encounter several different problems or bugs, (for
example, a bug in your project, and an interpreter crash while debugging
it), please create distinct issues!

Attachments:
	XMLParse-example.tar.gz  15.3 KB





More information about the User mailing list