Reading an XML file using QXmlStreamReader

前端 未结 1 1663
生来不讨喜
生来不讨喜 2020-12-16 23:34

I want to read an XML file using QXmlStreamReader, but I really don\'t know where the problem is. My function reads the content of the first tag, but then it st

相关标签:
1条回答
  • 2020-12-17 00:20

    The problem was in the form of the XML document. I needed to create a root tag.

    The new form of the document is:

    <?xml version="1.0" encoding="utf-8"?>
        <students>
            <student>
                <firstName>mina</firstName> 
                <lastName>jina</lastName>
                <grade>13</grade>
            </student>
            <student>
                <firstName>Cina</firstName> 
                <lastName>fina</lastName>
                <grade>13</grade>
            </student>
        </students>
    
    0 讨论(0)
提交回复
热议问题