Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] - XML parser functionality in Qt project using libxml2
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] - XML parser functionality in Qt project using libxml2

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 4.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LakshmiSaripella
    wrote on last edited by
    #1

    I'm working on Windows XP and downloaded libxml2-2.7.8.win32.zip, zlib-1.2.5.win32.zip, and iconv-1.9.2.win32.zip.
    I would like to read a .xml file in Qt project using libxml2.

    How to add these libxml related .dll/,lib and .h reference in Qt project to achieve the XML parsing.

    .xml exists in my application root folder.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Isn't it almost the same question as "this one":http://qt-project.org/forums/viewthread/31840/ ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Hello,
        you can add dll and lib files in .pro file of your project (just go through qmake tutorial where it is described in details). And for atcual parsing you can create some "wrapper" class which will take say QString and pass QString::toStdString() to libxml or QString::toUtf8().data() if you need char*.

        1 Reply Last reply
        0
        • L Offline
          L Offline
          LakshmiSaripella
          wrote on last edited by
          #4

          Thanks for all the received replies.

          Yes, I've put respective .dll, .lib files (libxml2 external libraries in this case) into a separate folder and performed proper reference in my .pro file. It worked as expected.

          I suppose no proper availability of dll, lib files @ runtime is the reason for 'Exited with code -XXXXXXX1515' ERROR in Qt.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Indeed, if dlls are missing from the path, they can't be loaded when calling a function they implement thus the error.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved