2
Я хочу использовать retrofit2
с simplexml
, чтобы преобразовать http-запрос. Это android код. У меня проблемы с преобразованием xml. Как это сделать? Как я могу написать класс?SimpleXML Как перенести это в код Android?
<DataSet xmlns="http://WebXml.com.cn/">
<xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="Dictionary">...</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<Dictionary xmlns="">
<Trans diffgr:id="Trans1" msdata:rowOrder="0">
<WordKey>hello</WordKey>
<Pron>'heləu, he'ləu</Pron>
<Info/>
<Translation>int.(见面打招呼或打电话用语)喂,哈罗</Translation>
<Mp3>1059.mp3</Mp3>
</Trans>
<Sentence diffgr:id="Sentence1" msdata:rowOrder="0">
<Orig>
She actually condescended to say hello to me in the street today.
</Orig>
<Trans>她今天在街上竟能屈尊跟我打招呼.</Trans>
</Sentence>
<Sentence diffgr:id="Sentence2" msdata:rowOrder="1">
<Orig>
I said hello to her, but she ignored me completely!
</Orig>
<Trans>我向她打招呼, 可她根本不理我!</Trans>
</Sentence>
<Sentence diffgr:id="Sentence3" msdata:rowOrder="2">
<Orig>Hello there, what a coincidence!</Orig>
<Trans>你好,真巧啊!</Trans>
</Sentence>
</Dictionary>
</diffgr:diffgram>
</DataSet>
Tagging, чтобы получить ответ, когда в ответ сообщества. @TomDuan, вы получили ответ за это – Android