parsing binary xml with Qt



  • Hi, I am trying to implement binary XML parser. At 1st i tried to use QXmlStreamReader class for this but didn't succeed ( probably due to the lack of experience ) so i looked through the Internet for an example and there are of course number of 3d party libs but i am interested in writing this parser exclusively with Qt ( if it is possible of course ). At the end I found that there was a very interesting class ( QWbXmlReader ) in qtopia plugin for Qt 4.* ( which is not part of the current qt ( v 5.9 ), as it seems ) and so i wanted to ask for an advice, which class is better to use for writing this type of parser or maybe there is something similar to QWbXmlReader class from qtopia plugin?

    Thanks in advance.


  • Qt Champions 2017

    Hi
    What type of binary XML ?
    Do you mean the very old
    "Binary XML Content Format Specification" ?
    a so called WBXML file ?

    Often used with the sync frame work on windows/ mobile stuff ?

    If you look around you might find some libs you can use
    https://github.com/libwbxml/libwbxml

    I think it would be possible to write a brand new lib from scratch using
    Qt alone but its a pretty big spec...
    http://www.openmobilealliance.org/tech/affiliates/wap/wap-192-wbxml-20010725-a.pdf



  • Hi mrjj, thank you for your reply, actually i also looked through the very same src on github while i was thinking about 3rd lib party. As for requirements for the lib they are a bit specific as the binary standard was build in the organisation i am working on. well i just thought if it is possible to use something from qt itself.


  • Qt Champions 2017

    @ainu
    hi
    Well Qt has XML parser but its not for anything binary as far as i know.
    Dont the organisation have a parser then ?



  • @mrjj regretfully not, they don't. It is my current task to implement it.
    Thank you for your help.


  • Qt Champions 2017

    @ainu
    Oh so its not strictly WBXML but something close?



  • @mrjj yeah, i thought that qt class QWbXmlReader would be the closest to mine and so i checked WBXML also ( well actually at first i checked WBXML as i read wikipedia at first to find at least basic information on binary representation of XML ) but truly speaking even despite that i understand that each lib has its own implementation ( and its prons and cons ) my choice of the lib was mostly based on its documentation i.e. if it has good manual or not. I am really very new to this topic ((
    Another good library ( as it seems, for me ) can be EXI as it has really good description
    What do you think? Have you ever tried it?


  • Qt Champions 2017

    @ainu

    Hi
    Nope I have not used EXI but since its seems vastly newer ( last changed 2016-11-02)
    i would go with that. Adding that documentation seems really good, it would surely try
    a few tests with it to see if could be used. Also if possible to contain the internal format into
    XMPP structure, it would be added benefit of interoperability and following a standard.

    So yes. seems like a good idea if it fits the specs.



  • @mrjj thank you for your reply. I will give it a try.


  • Qt Champions 2017

    @ainu

    Happy programming and good luck



  • @mrjj thank you)



Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.