Bug? Xml2map.map2xml supports libraries with bugs?(Xml2Map.Map2Xml 支持库的BUG?)

hzq200409

Member
Licensed User
The problem with XML causing the IDE to not work properly.
XML files generated by the XML2map.map2XML support library can have serious problems parsing in B4X:
When the "comment" node has no content, the resulting XML file is written as "<comment/>".
This is not approved by the B4X compiler.Can cause unexpected errors.
Because b4X-IDE is parsing the support library help file ".xml", encountered this method of writing the file will not work.
It only accepts :<comment></comment>
5Z_U`~W$HCKI0D%V[EJ{Z(9.png


The XML on the left is unmodified and can be recognized by the IDE.The XML on the right is generated by the library parsing and is not recognized by b4X-IDE.
As Erel said. Because the XML file was corrupted.
 

hzq200409

Member
Licensed User
This problem is caused by the way MAP2XML writes the following data when it generates strings:
MAP2XML writes it as <key/>
B4X:
{
    "example ": null
}
I don't know if this is an IDE BUG or MAP2XML BUG.[/CODE]
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
The bug is not in Xml2Map as it is a valid XML.

The problem is in the IDE XML parser. The self closed element does break the parser. We never encountered it as the standard tool used with libraries doesn't emit such elements.

It is fixed for the next update.
Note that you are translating an old version of OkHttp. The DependsOn element was updated.
 
Top