0

我不会解析 xml 文件,但我想在 python 中移动它。(即 etree) 我知道 etree 的基本知识,但我只想知道 xml 命名空间。我在代码中有 3 个命名空间。这是我要转移的代码。

<?xml version="1.0" encoding="UTF-8" Standalone="yes"?><ns1:g2sMessage xmlns:ns1="http://www.gamingstandards.com/g2s/schemas/v1.0.3"> <ns1:g2sBody ns1:dateTimeSent="2014-08-14T15:30:48.692+09:00" ns1:egmId="TestAppEGMID" ns1:hostId="1"><ns1:communications ns1:deviceId="0" ns1 :sessionId="1001" ns1:sessionType="G2S_request" ns1:timeToLive="100" ns1:commandId="1001" ns1:dateTime="2014-08-14T06:30:48.696Z"><ns1:keepAlive/> </ns1:communications></ns1:g2sBody></ns1:g2sMessage>TestAppEGMID1

有人有想法吗?

4

0 回答 0