хотел бы узнать, как определить корневой заголовок словаря, я отсканирую QR-код, чтобы получить ссылку, которая затем преобразует XML в словарь. мне нужно определить заголовок <image>
или <audio>
так как мне нужно получить разные данные из них.
спасибо за отзыв.
У меня есть это 2 XML
<image>
<postID>999</postID>
<title>picture question</title>
<question>What is that?</question>
<hint></hint>
<content>http://test.com/download.jpg</content>
<direction>Right</direction>
<answer1>a</answer1>
<answer2>b</answer2>
<answer3>c</answer3>
<answer4>d</answer4>
<correctAnswer>b</correctAnswer>
<score>10</score>
</image>
<audio>
<postID>333</postID>
<title>audio question</title>
<question>Who is talking?</question>
<hint></hint>
<content>http://test.com/autobots.mp4"</content>
<direction>Up</direction>
<answer1>1</answer1>
<answer2>2</answer2>
<answer3>3</answer3>
<answer4>4</answer4>
<correctAnswer>2</correctAnswer>
<score>40</score> </audio>