[solved] [Split] Problem with QXmlStreamReader



  • I have also used the same code to read a xml fiile
    but i have some problem in parsing
    I read the XML file form IP MODEM successfully

    @
    <Response>
    <Response_End>1</Response_End>
    <Unread_Available>1</Unread_Available>
    <Msg_Count>01</Msg_Count>
    <MessageNotification>
    <Message_Index>1</Message_Index>
    <ModemNumber>1:9869470691</ModemNumber>
    <SenderNumber>+919869460725</SenderNumber>
    <Date>11/08/24</Date>
    <Time>01:27:50</Time>
    <EncodingFlag>ASCII</EncodingFlag>
    <Message>this is a test message</Message>
    </MessageNotification>
    </Response>
    @

    I want to extract the data using QXmlStreamReader can u pls help me

    [EDIT: formatting the XML, Volker]



  • mukandansree,

    First, please format your XML to make it more readable. Put it in a code section (between @ characters) and use indentation for the different levels. That makes it easier for us to help you. (Edit: thanks Volker for doing that for mukandansree and for splitting off this topic)
    Second, what exactly is your problem in using [[Doc:QXmlStreamReader]]? There are some nice examples in the documentation on it... A generic question "please help me to parse this" is not likely to yield you anything.



  • First:
    Please do not append your question to a randomly chosen forum thread. If you have your own problem, start a new thread. Therefore I've split off your question.

    Second:
    Please format your code (including XML) nicely, so that others can read it easily. Wrap it in @-tags for the formatting (or use the code button of the editor, it inserts that for you). If you don't care to invest some seconds for making our lives easier, why should we invest some minutes to care for your problem? You might want to read http://www.catb.org/~esr/faqs/smart-questions.html for some more useful hints

    Regarding your actual problem, it is unlikely that you will get a solution this way. As Andre already stated, there are good examples on how to use [[Doc:QXmlStreamReader]] in the docs. If you're stuck somewhere, we'll be happy to look at your code and help you with finding the problem, but a prerequisite is some visible effort to solve the problem from your side.



  • Thanks for reply I solved the problem


Log in to reply
 

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